how to enable, disable and show HDMI output
If Raspberry Pi is started without the monitor connected, the HDMI output will remain off. You can subsequently use the HDMI output during operation. But you have to enter some commands via VNC on the command line or in an SSH session.
Solution: Turn the HDMI output on and off
If you are connected to Raspberry Pi via SSH, then you can switch the HDMI interface and thus the HDMI monitor on and off.