@JonB I also thought it could be due to cache, so I ran the manager.clearConnectionCache command but that does not help.
I also tried to find a way to force it to provide credentials but I have not found any other way to do so. But that was when I still wasn't sure that the server actually requests this, but since I now know that the server sends the www-authenticate request I know the error is in my applicaton or in qt.
Yes, I get the QNetworkReply::AuthenticationRequiredError. So weird that I get that error and not the authenticationRequired signal.