Hi @mg-1662
I have a similar scenario, I use a Windows VM and in this case I use VNC software, which keeps the connection open as a "console"
However, there is a solution on stackoverflow that can help you:
"we may "convert" a terminal session into a console session instead of disconnecting from Remote Desktop normally by running the following command from inside the terminal session:
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (tscon.exe %%s /dest:console)
This will disconnect you from the session, but it will still run with full graphical context. This answers your question. You can reconnect to it and it will become a terminal session again, and you can do this infinitely. And, of course, autohotkey works perfectly."
Get in touch if you need more help with this issue.
--please don't forget to "[Accept the answer]" if the reply is helpful--