I’m not that familiar with Auth0, but most OAuth-style providers allow you to set a callback URL on the client/application you have configured (I believe Auth0 call them applications). The one you have set to use on your Render service probably has the callback URL set to http://127.0.0.1:5000/callback so after Auth0 does the auth dance it is redirecting to this URL (or telling your Render service to redirect to this URL).
You probably need to use different applications on Auth0 depending on if you are running locally or running on Render as the callback URLs will be different (localhost vs *.onrender.com/custom domain).