The solution for me was to simply install drivers for my newest monitor.
I have three monitors and this problem was driving me nuts (actually irking me every time I woke my PC, and then I'd forget about it).
When I went about following the instructions for the (highly voted) comment below, I noticed in Device Manager one of my monitors was "Generic PnP Monitor".
I found the definitive solution to this: do as Stephen, (st99), says here in the ninth answer – Soldeplata Saketos (May 3, 2018 at 8:48 )
I copy-pasted Stephen's solution in the end of this post, since no one seems to have done it yet.
I was deleting old unused monitor devices ("Show hidden devices") when I realized my primary monitor (the newest) was the only one without a proper driver.
Now, I don't remember installing manufacturer drivers for my other monitors, buy maybe I did when I installed them.
Once I went to LG's website, downloaded and installed the drivers, I stopped having the problem (tested with 1-minute sleep).
Or maybe what fixed it for me was deleting the old monitors, as per Stephen's instructions. However, I never rebooted the system. Also, installing the driver seems like a stronger action to me.

STEPHEN'S (st99) SOLUTION
Hello,
I think I may have a solution for this problem. It appears Windows 10 keeps a history of all the monitors it encounters during its life time. This includes the basic monitor support during the OS install. So, if you enable "Show hidden devices" in the Device Manager you will see all the monitors that were connected to your system.
Start the Control Panel as Administrator:
- Start Control Panel --> Device Manager
- Select View --> Show hidden devices
- Expand Computer --> Monitors
When you expand the Monitors you will see your current monitor (highlighted) and all the disconnected monitors (greyed out). You may see monitors with "non-PNP" and "PNP" listed as well. I believe these are aliases to your current monitor (at a lower resolution) before Windows installed drivers for it.
I uninstalled ALL the greyed out monitors. Right-click on these monitors and select uninstall. Keep only the highlighted monitor you are currently using.
- Uninstall all greyed out monitors (even non-PNP and PNP monitors)
- Reboot your system.
After doing this my windows don't resize after my monitor goes to sleep. You can quickly test this by temporarily setting your monitor sleep time to 1 minute.
Settings --> System --> Power & Sleep --> Screen [1 minute]
Cheers,
Stephen