Sorry for the late response!
The best way to debug this is to log out the authentication state when you refresh the page. I think there's something wrong with state persisting, so you can check if the state persists this way.
If possible, would you mind uploading what the console outputs and how you are protecting the routes?