This approach is still not ideal as it assumes there's a visible stack somewhere in the Hierarchy. It's better than the current implementation so I'm pushing it and will reiterate in the future if needed.
A local example project using react-native-navigation. The target app for all e2e tests.
react-native-navigation