Check unattended sleep
Run the following in elevated PowerShell
powercfg /A
# Check if there's S1, S2, or S3 listed
Disable Unattended sleep
Show Advanced option
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 -name Attributes -Value 2
Change Unattended System sleep setting
In the Control Panel navigate to this path:
Control Panel -> Hardware and Sound -> Power Options -> Change Plan Settings
Click on Change advanced power settings.
Navigate to item System unattended sleep timeout and expand it.
Change its value to your liking, e.g. 1 day is 1440 minutes.