AllowedCallback is different after deploying built React app on Apache and give a 404 error

When I test my Application locally, it works fine. I use React CRA and webpack dev server on localhost (e.g. http://localhost:3100/home). My website server runs Apache and when I build and deploy my app, the redirect adds a ‘code’ parameter and I get a 404.

I have my AllowedCallback URL set for example like this →, the actual URL ends up being like this → and I get a 404 because the AllowedCallback doesn’t match.

I cannot figure out why there is a parameter on my server and NOT locally, and how do I get rid of the query parameter?