I have a laptop with macOS Monterey (12.1) with an external screen. I only ever use this laptop connected to this screen, but I take it off every day after work. I also use Yabai, a tiling window manager for macOS.
Every time I disconnect and reconnect the HDMI cable, windows move around and get rearranged as workspaces appear and disappear. I then have to manually put all the windows back on the right workspaces and in the right organization. I have to do this for about 20 windows, every day. This is very annoying.
I would like to make it so macOS always thinks that my screen is connected, regardless of whether the HDMI cable is plugged in the dongle, so nothing changes when I take it off or on (I wouldn't have access to my off-screen windows when the screen isn't connected, but that's fine). Is that possible somehow?