A. Disable auto-rotate in your device's settings to prevent unwanted screen rotations. Go to Settings > Display > Auto-rotate screen and turn it off.
B. If you need to use auto-rotate, consider using an app that allows you to lock rotation for specific apps only, providing more control over when the screen rotates.