Custom Domain not being used in redirect in Production, only when running locally

Hello, I am using the Lock template on my Universal Login page and I’ve followed all the docs but when I click to log in on the production site it still pushes me to the MYDOMAIN.us.auth0.com, even though I set a Custom Domain of auth.MYDOMAIN.ai. MYDOMAIN.us.auth0.com is the domain listed under my application’s Domain field in the general settings. Also, this field is grayed out and I am unable to change it.

When testing locally, because I set an environment variable with my new desired custom domain (the same domain listed under my Custom Domains tab), I do get the desired redirected URL (auth.MYDOMAIN.ai).

My question is 2-fold: 1) why does auth0 only correctly read that environment variable and properly redirect when I run the app locally?
2) Why is the domain field grayed out in my application settings and how can I actually change it?

New context for the issue:

Amplify was overwriting the environment variable and we were looking to move away from it anyway, and it’s almost working perfectly via Vercel deployment, but that caused a larger issue where Social Login takes us to the Oops, Something went wrong error page.
Upon opening the login page, the domain is accurate and Username/Pass authentication works swimmingly!
However, after clicking Social Login, the user is redirected back to the original MYDOMAIN.us.auth0.com where the Error screen is shown. I’m assuming it’s still pulling from the greyed out Domain field in the Application settings, any one have any idea how to fix that?

Fixed!!

For anyone reading this in the future, make sure to get your Client ID and Client Secret from Google (not the Auth0 client id and secret!!) and input that into the Social Connections in Auth0 Dashboard. That can be found in the left nav bar under Authentication->Social->social provider you’re using.

I had it blank, so it was using Developer keys, and that is not allowed with Custom Domains. Inputting the Client ID and Secret solved the issue with it redirecting to the old Auth0 domain, and also showed our logo and website when the user is prompted to select a Google account (as opposed to auth0.com). Hope this helps!