You can try adding some information to the current session of the user.
When the user navigates to your page, create a non-persistable object that stores the user’s current location (i.e., the page they navigated to).Link this object to the current user or a specialization of user.
Then, when the user refreshes the page, you can use the navigation logic of your app to check whether there’s any stored navigation info for the current user. If such info exists, automatically navigate the user back to that page.
To make this work consistently, you’ll need to add this generic logic to all your navigation flows, or you can reset this navigation info when the user navigates away from your page
If you set page URLs for each page, this should work - a refresh will simply bring the person back to the page they were already on.