I have a desktop computer at work with Windows 10 that I have to access remotely through Windows RDP frequently.
It works well usually: it responds to pings both through another local machine or a remote machine that is connected to the VPN, and RDP works too without a fuss.
But, many times, after not being used for a while (for instance, when I try to connect the next day after staying unused overnight), it stops being reachable: all ping attempts fail (both local and through VPN) and RDP does not work either. Starting a remote Power Shell interacting session does not work either when it usually does. After restarting the computer locally, it works again.
All energy-saving options are disabled: never suspend, never hibernate, never stop the hard disk, never shut off the screen, and the network adapter energy-saving options are also disabled (as suggested in the last post of this thread). I have physical access to the computer and I can attest that it does not go idle. I do not spot anything weird in the event viewer.
I have Windows 10 up-to-date, and I have also updated the drivers and the BIOS, to no avail. It does not always happen but it is very common. Sometimes, I try to remotely connect after not using the PC for days and it works, but usually, it just takes overnight and it cannot be accessed again.
Interestingly, TeamViewer always works. For some reason, when pings and RDP are not responding if I try to connect through TeamViewer it works, and then pings start responding again, RPD works, and everything is fine until the next period of time without using the PC. It is like TeamViewer somehow manages to "wake up" the computer.