When the first time you connect your Pi through VNC, anything works fine. However, when you think it’s time to unplug the HDMI and run it only through VNC, things start to go south.
It’s okay… until you it restarts.
That is, when you run a server or the Pi without a monitor connected. It is the so-called ‘Headless’. However, if the Pi starts in this mode, it can not find any working monitor, then it will have no resolution parameter generated. Then you will find yourself working with a default, small like an apple watch screen VNC desktop window. And you have no idea to drag it larger.
So, unfortunately, you have to plug your mouse and HDMI back to the Pi again. Then go to the Raspberry Pi Configuration. On the Display tab, you will find the Headless Resolution setting. Give it a good resolution instead of the default smallest one.
Now you are safe to unplug the HDMI and mouse to restart.
Of course you can use ssh to do the same thing through raspi-config .