The following demo works well on Android and IIRC used to work on Windows but now doesn't.
Can anyone else get the screen to stop going to sleep on Windows Chrome, Edge, or Opera?
After some testing, I guess you may have configured the power settings, so it does not work. But I think this is wrong. I think what you are describing should be the screen saver after Windows has not been operated for a period of time, not sleep.
Please try the following steps (reset your power settings, you can choose to set it to never: both display and sleep):