I am pretty sure I've digged through most of the available threads regarding this issue, and yet none provided a working solution.
I have ticked off the "Allow device to wake PC from sleep" option in mouse and keyboard settings. Upon checking wake_armed devices in command prompt, no devices are listed. The same goes for waketimers. What is even more awkward is that "lastwake" returns Wake History Count - 0. I've also tried reinstalling the touchpad, keyboard and HID controller drivers together with updating the BIOS.
Any suggestions on what might be the problem? Thank you for all your help.