"Page Not Found" in multipage app page url before st.navigation called

When using the new st.nagivation feature, if I go directly to a page like: localhost:8501/mypage, I will get a “Page Not Found” model with : “You have requested page /mypage, but no corresponding file was found in the app’s pages/ directory. Running the app’s main page.”

It will actually load the page in the backgroud behind the modal, because after st.navigation is called, it correctly knows that /mypage exists. How can I make it not display the modal window though?