Browser back button doesn't work with Deep Linking

I am currently making a web app. I initially just used nav.push() and nav.pop() to navigate, but then the browser back button did not work as intended (due to the link never changing).

Now I am trying to use deep links (So my links look like “https://localhost:8101/#/page”), however when I use the browser’s back button, I get the following error:

Is there something extra that I need to do with the NavController?