I've seen a bit about this online and can add some info. With an lcd screen, the light aspect is always on, so there's a continuous stream of light. Dimming is done how an old lamp works.
With oled screens, there's no backlight to dim as the pixels shine themselves. Meaning to dim an oled screen, the screen must flash very fast. The longer it stays off for, the darker the human eye sees it as. Either for power reasons or something else, the speed the s25 displays flash at seems to be slower than devices usually use. Slower flashing means your brain had to sorta fill in more gaps. With some people, this doesn't really work and their brain kinda gets unhappy, causing a headache. It seems you're one of the maybe 0.01% who experiences issues with how the screen works.
Try setting the brightness manually and see if low or high brightness helps. In terms of actually fixing the issue, it affects so few people I doubt anything will be done.
This is from what I've seen online so have a look yourself. I'd hate to have read something wrong causing you to return your phone
The exact thing to sorta Google is "s25 pwm" as pwm is the tech that makes the screen flicker to adjust brightness