React okta Login Redirect gives 404 in UAT but working local deployment

We deploy react application with okta hosted ui. post successful login , it is redirecting to
https://xxxxxxx/login/callback?code=TUwzqSfJY5DGY_7ICxn7LsIoJW4ewBiGIAwPxFwaoh8&state=OQKfJnvG2krSMDdfVB78O2TJgpZs4gJ4aQtvJLiYqlvaVnI7gkKNiJnMId12QswF

and gives 404 not found. it is not redirecting back to my base URL.

there is no web server. running react app with npm

Same config working in local. post login , it is going to http:localhost:3000/login/callback?code… and again back to http:localhost:3000 without issue.

followed steps in Sign users in to your SPA using the redirect model | Okta Developer

using below version :
@okta/okta-auth-js”: “*”,
@okta/okta-react”: “^6.7.0”,