A WordPress menu page is something that’s easy to introduce thanks to API functions like add_menu_page. On top of that, it’s easy to add submenus using add_submenu_page.
But if you’re working with the plugins_loaded hook or a plugin bootstrap file, then trying to introduce a WordPress menu page (along with any related submenus), you may end up with some unexpected results.

The plugins_loaded documentation in the code reference.
Specifically, you may find that your menu and submenus display fine, but they don’t work when you click on them to navigate to the relative page.



