Open the Shortcuts app, you should have it unless you’ve deleted it.
Select automation from the bottom navigation
press the plus, in the top right
create personal automation
select “app”
click choose and choose which app
then toggle either is opened or is closed
click next
click add action >
type “orientation” in the search box at the top
click set orientation lock.
Now it should say “Turn” on blue at the start of the action, if it says toggle or ask each time, click it and choose “Turn”. Finally choose On or Off at the end of the action.
Click next, uncheck ask before running (otherwise what’s the point) and click done.
It sure is. Which helps a great deal since I set it to lock the screen rotation whenever browsing Lemmy on Memmy since it screws everything up when it goes landscape. So much appreciated!!