I don't know if you found it already but according to MDN you can use ScreenOrientation api:
https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock
For native profile you can set this in the Native builder “Build Native App” in the Orientation selection: