Updating the registry on a desktop PC as suggested below will do nothing because TMM does not run on desktop PCs. Skip to the other solutions section of this post.
TMM is only supported on mobile computers, not desktops. Specifically, the Transient Multimon Manager (TMM). In both Windows 7 and Windows 10, there is a way to disable the monitor auto detection feature by changing the registry. In this article I will cover a few possible solutions that you can try to help resolve this from occurring so you won’t have to reorder your windows after waking your monitors up from sleep. They are basically trying to ensure that you don’t end up with a blank screen with all your open windows on a turned off monitor.
Because the response time differs, for one reason or another, on your monitors Windows moves your open application windows to the available monitor. The issue is that Windows is trying to “ help you” by automatically detecting which monitors are on and available. Are your application windows resetting to the primary monitor after waking your monitors from sleep on your Windows 10 PC? At least you know that you are not alone with this annoying issue.