I would like to mention that Google own SPA framework, angular, has redirect routes which effectively do back button hijacking if used, because they add the url you're redirecting from to the history.
I revently built an app with SvelteKit + Capacitor and had to implement the stack-based navigation one expects from a phone app myself.