This article explains how to disable S0 and replace it by S3 on windows:
https://www.notebookcheck.net/Useful-Life-Hack-How-to-Disable-Modern-Standby-Connected-Standby.453125.0.html
What are the equivalent commands for Ubuntu?
How to check what standby is currently used on Ubuntu and how to change it?