Good day! This sounds like the classic Windows "clamshell mode" bug. If you already set the lid to "Do Nothing" and it's still acting up, it's usually because Windows is getting confused about which screen is the primary.
Try these quick fixes:
Hit Win+P and select "Second Screen Only": Do this before you close the lid. If it’s set to "Extend," Windows sometimes forces a sleep command when the primary (laptop) display disappears. Switching to Second Screen Only tells the PC to ignore the laptop panel entirely.
Keep it on the charger: A lot of laptops (especially HPs and Dells) have a BIOS-level override that kills the external display when the lid closes if you aren't plugged into a wall outlet, even if your Windows settings say otherwise.
The "Handshake" Reset: This is the most likely fix since it happened randomly. Plug the monitor in, go to Device Manager, find the monitor under the "Monitors" tab, right-click it, and hit Uninstall. Unplug the HDMI/DisplayPort cable, wait a sec, and plug it back in. It forces Windows to rebuild the connection profile from scratch.
Fast Startup is trash: Windows "Fast Startup" saves driver errors instead of clearing them. Go to Power Options -> "Choose what the power buttons do" -> uncheck "Turn on fast startup." Give it a full restart.
The performance lag you mentioned is a huge hint—it means your GPU is struggling to sync the refresh rates between the closed lid and the monitor. Forcing "Second Screen Only" usually clears that lag right up.
Let me know if that works or if your laptop brand has a specific power management app (like Vantage or Command Center), and I can dig deeper