I had the same experience as DavidHasko. I'm running Windows 11 Pro 22H2 pre-installed on a mini-PC.
I had no problems with the screen and computer not turning off and going to sleep when I used a Logitech keyboard and mouse with a Unifying receiver.
I decided to swap the Logitech keyboard/mouse with an older Microsoft wireless multimedia keyboard/mouse that uses a USB wireless optical desktop receiver 2.1. The MS keyboard/mouse/USB receiver worked fine on a Windows 10 computer. However, when used with my Windows 11 PC, the computer stopped going into screensaver mode and sleeping.
I was about to buy another Logitech keyboard/mouse when I looked under Settings > Windows Update > Driver Updates and saw a few optional updates (This is with the MS keyboard/mouse/receiver plugged in). I updated all of them and saw afterward it installed a couple of Microsoft HIDClass device drivers and a Microsoft Mouse and Keyboard Detection Driver (USB). After the update, the screensaver and sleep mode started working with the MS keyboard/mouse/receiver as they did with the Logitech keyboard/mouse.
This is what worked for me. Microsoft wireless keyboard. Using Windows Update, installed the optional drivers, which included the Microsoft HID class drivers. Voila!