In your other post, you mentioned using Ionic with Vue. My guess is that Ionic is causing the “back” to continue.
Check out the Ionic back button docs - Hardware Back Button for Capacitor & Cordova on Android Devices. I use useBackButton
to intercept the back button (back gesture on my Pixel 7) successfully.