Thanks to @furas for pointing the error I made, I was using url: "
https://www.sec.gov/Archives/edgar/data/1965040/000112760224010272"
instead of
https://www.sec.gov/Archives/edgar/data/1965040/000112760224010272/form4.xml"
which caused the issue. I was able to download the file once I corrected this mistake even with my original headers. Many thanks to you all for the input.