Set Camera and GUI to Landscape While the device is in portrait mode

I have a web app distributed on mobile phone device. I want the user use it with device orientation locked to portrait mode but at the meantime I want the user experience the fake landscape interaction, both GUI and the camera view of 3d content as he/she in real landscape screen mode. How to achieve this related to both GUI and 3d content?

There have been a few discussions on this topic already, you can find them searching by “landscape”:
Force landscape mode - Questions - Babylon.js (babylonjs.com)