Try to disable your firewall & antivirus too.
Did you install VScode and unreal in C and your unreal project in it default folder c document ?
Yes it could be related to an environment variable.
(personal pref) i suggest using visual studio, my friend had lot of issues with vscode and seem to catch less user error compared to visual studio such as using reserve word name.