Over VNC, configure the system to not use a second monitor while it's physically connected
Depending on what type of Apple machine you are connecting to, you can try these commands and see if they work for you. I know they are used with X11..This is the command to disable dual screens (Assuming it's a laptop).

xrandr --output VGA --off


And if you want to this is a command to enable the dual screens (but might aid you in troubleshooting getting the secondary one off). LVDS is the liquid display and VGA is the secondary monitor.

xrandr --output VGA --mode 1024x768
xrandr --output VGA --right-of LVDS