But it happens way before I request a ad though, I tried disabling the code that requested the video ad and everything else and I still get it. It happens when I create a AdDisplayContainer so basically when I run this:
const container = new google.ima.AdDisplayContainer(..., ...);
I think it might be happening because the IMA SDK tries to interact with the IFRAME during instantiation but it fails.
I'm using the Google
doubleclick.net example ad btw, the one in the IMA SDK guide from
https://googleads.github.io/googleads-ima-html5/simple/.
This is what the response headers of the ad looks like:

It has both the Access-Control-Allow-Origin and Access-Control-Allow-Credentials headers present. I've seen guides recommending adding tags to the IFRAME so that the page can interact with it but gets made inside the IMA sdk so I can't access it.