Invoke-Webrequest does not work in Github Actions/Workflow

I have this PowerShell script which is ran via Github Actions.

Sadly it seems that all my Invoke-Webrequest calls just return:

Invoke-WebRequest: D:\a\rssguard\rssguard\resources\scripts\github-actions\build-windows.ps1:40
Line |
  40 |  Invoke-WebRequest -Uri $qtbase_url -OutFile $qtbase_output -MaximumRe …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     |   302 Found  Found The document has moved here.  

But when I execute exact statements, then all files get downloaded correctly. I am lost, any ideas my fellow brothers?