I can now answer my own question.
The problem is caused by having a pair of rudder pedals (used for simulating flight) made by a company called CH Products connected to my PC via USB.
Looking in Device Manager under Human Interface Devices, the pedals are referred to as HID-compliant game controller and their device instance ID is VID_068E&PID_00F2\7&306b5100&0&0000.
These pedals have been working perfectly fine until recently. So apparently something changed in one of the latest Windows updates that is now causing this issue where the screensaver including shutting the display off after a certain amount of time no longer works unless the pedals are disconnected or disabled in Device Manager.
If I recall correctly I and lots of other people faced very similar issues a couple of years back that were eventually acknowledged and fixed by Microsoft. I hope that is what will happen this time around as well.