MPA navigation not working with capacitor?

Hi, I’ve just setup capacitor for the first time.

My app is statically generated using astro. So it’s an MPA not an SPA. For navigation I was trying to set the URL using window.location.href.
For testing purposes I tried to redirect from my index to the login page. But it’s always loading the index again. is there something I need to configure to make this navigation work in the simulator? It works in a regular desktop browser.