VNC remote desktop and external display

I have a HDMI display connected directly to the Nano. I am connecting to the Nano through VNC too.
In my vnc connection I can see the desktop, as well as the external monitor does.
Is there any way to see the desktop only in the vnc viewer and let the other display as a second screen? Or an extended desktop could also work. Thank you.

I won’t be able to give you the details, but you might be interested in this:

The gist is that a given server is usually designed to have a local desktop, and that any kind of remote desktop software is on top of that. Several of the servers are designed just for remote display, e.g., xvnc (VNC is just one example). The server itself and the remote desktop server are two separate sets of software, and so try to keep in mind there is both client (used for viewing, what you already have) and server (the X desktop container…you currently have a server designed to allow display to a real monitor). The client can be used to view ordinary servers or virtual servers.

You can run more than one X server at the same time (one could be for a real monitor, the other could be virtual…or you could even make both virtual or both real monitor), but software would need to know which one to use via the “DISPLAY” environment variable. The first server and second server would probably use “DISPLAY=:0” and “DISPLAY=:1”.