Xamarin start off by recommending that you show any login page via a PushModalAsync on the navigation stack.
I never liked that because it would keep login and registration sequences in your main app navigation, even though I know you can’t go back to it. But it could also so a flicker when it goes to your main page, then jumps to your login screen if you aren’t logged in.
I did discover a way to avoid this and then also found others had come up with this same method.
Create multiple navigation pages. One with your login page(s) and the other with your main app pages.
In your App.cs (or App.xaml.cs)
Change the main navigation page as you see fit. Then no back buttons ever cross over onto a navigation flow they shouldn’t be on.
Personally I use this pattern to also break out navigation flows within an app if they get too complex.