I have done some digging and am trying to figure out if there is a solution in windows 10. Basically when using display port on my primary monitor and hdmi to my second, when I turn off the primary monitor windows will see it as if I unplugged it and will move all windows to the second monitor. It only seems to effect dp, hdmi/dvi are fine. I am going to be upgrading my monitor here soon to a 144hz 1440p panel and it will require display port for the higher refresh rate.
I found a few articles online dealing with it but not really much out there except it is another wonderful “feature” Microsoft has included.
If anyone knows of a work around or if it is just going to be what it is. I tend to have a lot of windows open between 2 monitors(soon to be 3 once I get the new one) so having to rearrange everything constantly is rather irritating.