Is there a way to end Navigation Stack?

When an user for the first time opens my app he will go threw 5 “starting” pages and then he will end in the menu. I can’t use open page flow function in this scenario, because I don’t want user to go back from menu to “starting” pages. For now I am using replace page flow function, but it is not ideal, because I would like be able to go back from for example 5th starting page to 3th starting page, but for now I just can’t do this. does anyone know the solution to this problem?