I've 1 Admin and 1 Local user on Windows 10 machine and Sleep and Hibernate behaved as expected: PC awoken from Sleep by key/mouse press and from Hibernate only on power button press.
Yesterday I've added a new user to the PC with a "Log on as a batch job" Local Security Policy and with a Task Scheduler task that runs an app as that user -- all exactly as described in this instruction: https://www.mysysadmintips.com/windows/home-and-media/555-setup-minecraft-server-to-start-automatically or as screen-captured here (for those with false-positive malware warnings):
My problem is that the Sleep and Hibernate don't function anymore as expected -- the change (it seems) makes them automatically interrupted and PC awakens immediately.
My first guess was that the Task had some Power options wrong, but this (to me) looks OK:
What can I change (apart from removing the task/new user) to have Sleep and Hibernate function as before?
The problem was with network adapter allowing the media player waking up the PC (as it was using it as source for its library).
Disable these: