After authorization, I fail on the web and do not return to the react native app

Hello there!
We use react-native-auth0 for authorization in our app. We have a web and we have a mobile app. We also enable our users to use MFA. We have no problem if the user goes through all the default steps. But there is a scenario where the user gets to our web instead of returning to the app.

Steps for this:

  1. The user clicks on the button with authorize
  2. We open a browser where the user can enter a username and password.
  3. The user clicks on the next button and gets to the page with the MFA
  4. The user clicks on the back button and gets back to the login page
  5. The user enters username and password and clicks next
  6. Getting to the page with the MFA, the user enters the code and clicks the next button

Expected Result: The browser closes and the user continues to use the mobile app
Actual result: The user is still in the browser and sees our website.

The problem is when the user presses the back button if he/she does not do this, then everything works correctly. Has anyone had the same problem? Could you please help with it?