I tried flashing the newest Bios and installing the newest Lenovo drivers, but without success. The problem still remains. I've also tried some third party software like Keyboard King to set the repeat rate. Unfortunately with strange side effects like no typing possible in Google Docs only there. I also tried a custom task which is scheduled to kick in after resume from standby and to load the proper keyboard settings back to registry.
Tomahawk Z370 - how can I disable USB Power during standby / sleep mode
System Shutdown State S5 - Windows drivers | Microsoft Docs
States S1, S2, S3, and S4 are the sleeping states. A system in one of these states is not performing any computational tasks and appears to be off. Unlike a system in the shutdown state S5 , however, a sleeping system retains memory state, either in RAM or on disk, as specified for each power state below in System hardware context sections. The operating system need not be rebooted to return the computer to the working state.