Keycloak openid-connect/3p-cookies/step1.html not found error

I am trying to configure my Keycloak hostname. I have a frontend URL for the public requests and an admin URL not publicly exposed :

I have the following hostname configuration in my standalone-ha.xml file :

<spi name="hostname">
                <provider name="default" enabled="true">
                        <property name="frontendUrl" value="${env.FRONTEND_URL}"/>
                        <property name="forceBackendUrlToFrontendUrl" value="false"/>
                        <property name="adminUrl" value="${env.ADMIN_URL}"/>

Now I can’t access the Keycloak admin console (localhost:8081/auth/admin). It only loads a white page with the following error in the console :

GET http://localhost:8080/auth/realms/master/protocol/openid-connect/3p-cookies/step1.html?version=6rmi9 404 (Not Found) check3pCookiesSupported @keycloak.js?version=6rmi9:1314 Promise.then (async) (anonymous) @keycloak.js?version=6rmi9:350

I cannot update the “keycloak.js” file as seen in some answers because it is not an adapter but the builtin file from Keycloak. I also have updated the Content Security Policy of the master realm with the following :

frame-src ‘self’ http://localhost:8000 http://localhost:8080 http://localhost:8081; frame-ancestors ‘self’ http://localhost:8000

Have I overlooked anything ?