I'm wondering if the phone is reacting by itself because it believes the screen needs to be dimmed due to various lighting conditions.
Take a look in this similar thread which may help.
I'm using a different model to you as per my signature below and the screen dimming does not happen on mine.
Certainly a conundrum !
A Samsung Experience Store or Samsung Service Centre can take a look.
Daily Driver > Samsung Galaxy s²² Ultra 256Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help.
@Maxvax: The screen will dim slightly prior to going idle, which may be a possible explanation. With this in mind, try heading to Settings > Display > Screen Timeout, and increase the time here to see if you notice an improvement. You could also try Settings > Advanced Features > Motions and Gestures > Keep Screen On While Viewing > On.