I have been experiencing this same problem. I see how to change the orientation back, but is there a way of preventing it from switching in the first place?
I have a wide screen monitor, and I believe that the problem occurs when DOSBox tries to open in full screen. Obviously I never switch to full screen on purpose, but some games do it automatically.
For example, in Crystal Caves the outside border isn't normally visible in the DOSBox window, but when all the crystals have been collected, the colour of the border is supposed to change to green and DOSBox automatically tries to open in full screen and switches orientation of my monitor. Any suggestions on how I can prevent it from ever opening in full screen?
(I don't know how I can go on without my Crystal Caves!! 😀 )