Make sure you upgrade to SonarQube v9.9 LTS soon, not only to benefit from our Best LTS Ever™, but because soon we will systematically ask users to upgrade when they ask questions about earlier versions of SonarQube, which are now considered unsupported.
Thank you for your answer and pointing me in the right direction.
The solution for me was to change the HTTP Settings in the Application Gateway.
The setting “Pick host name from backend target” didn’t do anything - instead I kept the value “Override with specific domain name” and changed the value for “Host name” from the private IP address to the public DNS name.