The design consideration behind B4XPages is that it simplifies the activity cycle of Android by eliminating Pause and Resume.
This helps in making the App cross-platform (Desktop, Android, iOS), but it also means a commitment to a given orientation.
(As I mentioned, you can detect first how the user is holding the device and then make the orientation commitment before starting
B4XPages)
You can have one B4xPages Activity plus one or more non-B4XPages Activities, which can be unspecified orientation.
For example, one can do all the work in a B4XPages App based on how the user held the device when starting the App,
and then start another non-B4XPages Activity in a different orientation (for example to show a video in landscape).
You can access Globals in the first Activity (which is still active - not paused), and return to that Activity when finished with
the non-B4XPages Activity.
For each non-B4Xpages Activity, you'll have to handle the Activity cycle yourself with Pause and Resume subs.
With some planning, the exit and restart operation in the link in post #3 can occur seamlessly to the user.
If none of these approaches work in your situation, just revert back to a traditional B4A App. This is not a limitation of B4A.