As described in the report, if you roll the viewport (by e.g. 90 degrees using ⇧+4 or ⇧+6), you get a hard-to-navigate gimbal lock.
This situation is predicted in the code and a solution is even implemented for it.
But even with the existing solution, from the user's point of view, this is still very difficult to work with.
So this patch reworks the viewrotate_apply code to something more predictable.
For user feedback, I plan to make a build available for testing at https://devtalk.blender.org/t/counter-intuitive-viewport-navigation-when-using-turntable-orbit-method/24450