When you enable iPhone Orientation Lock it prevents the device from switching to landscape mode every time you tilt it. However, Orientation Lock does not turn on and off based on the apps you’re using. Moreover, iOS doesn’t even provide an option to set up Orientation Lock separately for individual apps. And, this gets really frustrating because you have to access the Control Center and toggle it on and off depending on the app.
Fortunately, you can set up automation through the Shortcuts app that will automatically toggle on or off Orientation Lock based on the app you’re currently using.