I had not previously experienced this problem, but I was recently on holiday spending a lot of time outdoors and (happily !) often in hot sunshine. The problem hit me smack in the face as soon as I attempted to take a landscape photo. I subsequently found that, whatever app I was using, if I turned the phone to landscape, the screen would turn off. If I turned back to portrait, the screen came on again immediately. If I turned the screen gradually, I would see the screen dim before becoming completely black.
Auto-rotate is off, but continues to work in Open Camera that I use.
The screen being dark does not affect the functioning of the app. I was able to take landscape photos (albeit approximate from the composition / framing point of view
).
Since this problem only occurred in hot sunlight when the device had been heated by the sun (but not early in the morning for example), I think it might be associated with the proximity sensor problem as mentioned by Uppercase in post 300.
[Edit: deleted text left in case others encounter the same phenomenon.]