I cannot reproduce this issue anymore. I spent several days hunting the fix and the issue just disappeared by itself. I’m not sure what was its reason or what fixed it.
The only unusual things I have done today are:
- detaching and reconnecting my keyboard to the same USB-slot (while I was testing the keyboard on a different machine);
- waking my desktop PC after it went to sleep on its own.
Thank you everybody for your time and for sharing your experience with me.