Wlock Pro is a Blender addon that stops the 3D view from rotating when you press a hotkey, set to Alt+W by default. It acts only on the 3D view, and a lock icon can appear as an indicator or be disabled in Preferences. You can keep any number of 3D views open, locking and unlocking each one independently.
The PRO release adds setup for your own hotkeys, setup of the status icon or button, and control over the status icon and button colors. The lock is not limited to orthogonal projection: you can lock the viewport from any user camera view by using the hotkey combination a couple of times. Suggested uses include 2D animation, where an accidental rotation of an orthogonal viewport is a common annoyance, and sculpting.
Wlock Pro is listed for Blender versions from 2.8 through 4.2 under a royalty free license, with documentation and a demo video available. A separate LITE version of the addon also exists.