I think a better question is: "How can you ensure any VS Code extension is safe to use?"
Understanding exactly what an extension does and getting clarity around how it operates is something that I'd like to better understand as well.
It makes me think that moving to other editors like Neovim might be a safer way to go, if Microsoft has created an environment where malicious plug-ins can operate.