Yeah, maybe...
I wish the OP would speak up about his real intentions cuz I'm about to drop this one!
Seems like a strange endeavor anyway!
One use for this is to have different settings for the two inputs, e.g. one Limited Range @ 4K for optimal video and the other Full Range @ 2K for faster gaming. Multiple settings typically have to be changed on both the PC and the display, which makes it cumbersome to handle this any other way. There are programs to help on the PC side, e.g. (haven't tried it, but it looks interesting!)
Easily change NVIDIA display settings and/or control LG TV's - Maassoft/ColorControl
github.com
However, for the display, you're at the mercy of whatever API the manufacturer provides. For example, Sony provides nice REST and other APIs which I use for many things, but they don't expose settings like HDMI range. I need to set it to Limited range for optimal video (Kodi Limited, Nvidia card Full, TV Limited), and that causes the desktop to be crushed. Thus, to avoid a bunch of manual reconfiguration, I use another input for the normal PC Full Range I use for gaming.
As for the OP's question, I don't know how to remove the displays from Windows when they're not in use. Actually, I think it probably is possible to automate it, as I can disable them in Nvidia control panel. However, once I turn the TV on, they come back, and they stay. I haven't found it bothersome enough to explore it further. I have four displays, and I keep the two TV hookups out of the way, and the only time I notice them is when using keyboard shortcuts to move windows between displays. Fortunately, Windows 11 is better about maintaining monitor configurations than earlier versions, though it can take a few reboot and power cycles to get it all worked out. I save the configuration with DisplayFusion for when it gets screwed up again.