Software⏱️ 2 min read📅 2026-06-03

How to Fix: Windows on second monitor moves to primary monitor after sleep/lock

Windows 10 dual monitor issue with sleep/lock

Quick Answer: Try enabling the 'Keep windows on top of other desktop elements' option in Windows Settings to prevent Visual Studio from being moved back to the primary display.

When you lock your computer and leave it for an extended period, Windows may not always remember the position of windows on multiple monitors. This can cause windows to move back to their default positions or the primary monitor when you unlock your computer.

🛑 Root Causes of the Error

  • Windows may not retain the monitor position due to its dynamic nature.

🔧 Proven Troubleshooting Steps

Method 1: Enable Multi-Monitor Windows Settings

  1. Step 1: Press the Windows key + P to open the Projector window.
  2. Step 2: Select the option that matches your monitor setup (e.g. 'Extend' or 'Duplicate').

Method 2: Set Windows to Remember Monitor Position

  1. Step 1: Press the Windows key + I to open Settings.
  2. System >Display.
  3. Position on screen should be set to 'Move with mouse'.

💡 Conclusion

By following these steps, you can ensure that your windows stay on the correct monitor when you unlock your computer.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions