I know there is often confusion about ctrl-alt-Fkey surprisingly "killing" X when in reality they have just switched to a text virtual console.
This is not that question.
When I switch to a virtual console something happens to X such that I can't switch back to X in vt 7. It's still running, but I can't X to show anything. Instead I see a blank screen at virtual terminal 7 with a blinking underline cursor (that doesn't respond to typing). Sometimes just killing and restarting the window manager will let me switch back, but usually I have to kill gnome-session or Xorg to completely restart it.
It used to only be virtual console 10 that caused this problem, I could switch to other virtual consoles fine and come back to X, but VT 10 would always break X. Now switching to any virtual console is crashing X.
Which Ubuntu are you using? GDM? LightDM? What Session? Can you provide some logs (Xorg, GDM/LightDM log, journal output at the time you switch).
If you use GDM (on 18.04 at least) on default it uses vt1 for the login screen and vt2 (or the next free vt) for the actual session once you login.
LightDM still uses vt7 for both on default.
You can also do a manually swtich using
sudo chvt N
. You may also check (for GDM and maybe LDM):