OnePlus uses OxygenOS, which has an annoying feature called Pocket Mode. This feature could be disabled in old versions of the OS, but in OxygenOS 12 and 13 it’s not there anymore.
Random activation of Pocket Mode
Pocket Mode gets enabled by random when the phone is exposed to sunlight, to me this happened while doing video calls outside or when using the phone for navigation in a mount on my (motor)cycle. To me this is totally unacceptable, especially since it made me fiddle with the device while driving in busy traffic.
Software solution
One could go back to OxygenOS 11, which would require a factory reset. To me, this takes too much time.
Another solution, which I’ve used for a while, is to enable the “Sensors Off” button in settings and toggle that and set the screen brightness to manual instead of automatic. You need to do this every time you’re using navigation.
If you forget to turn this off you cannot make phone calls, since you’re microphone doesn’t work with this Sensors Off toggled.
Hardware solution
Fixing it in software is the most elegant solution, especially since OnePlus also destroyed my ability to normally use the phone with software. However, sometimes just picking up a file (very fine one for metal) and breaking the proximity sensor can be the easiest fix.
For me this works now. However, the glass on my screen cracked in the process, but it’s still worth it since I can have video calls outside again.
Final remarks
Would I recommend anyone doing this? No.
But in my case, everytime this Pocket Mode happened to me while driving, was one time too much. Safety first.