While not identical (VS 2022 running on Windows 11 and Windows Server 2019 running in VMware), in my case it was solved by using a previous version of VS 2022 Remote Tools: 17.12, as 17.13 seemed to be the culprit of immediate connection drop.