This is the work around I am using:
1.- Create the text file "KeepMeIn.bat" containing:
set /p pass=Enter password:
for /f "tokens=3 delims= " %%a in ('qwinsta^| findstr "Act"') do set SessionID=%%a
tscon %SessionID% /dest:console /password:%pass% && Rundll32.exe User32.dll,LockWorkStation
2.- Place the file in "C:\Program Files (x86)" or equivalent
3.- Right click on "KeepMeIn.bat" --> Send to --> Desktop (Create a shortcut) or equivalent
4.- Right click over the shortcut --> Properties --> Advanced Options --> Run as administrator
Instead of using the "X" to close the session or Windows --> Disconnect , use the shortcut. It redirects the GUI to the console and keeps it open allowing Hamachi to keep connected.
I hope this helps.
Regards
GuiX