I don't use self contained vaults but your description sounds as if git inside vscode isn't aware of ssh. What ssh implementation do you use? You may need to set the GIT_SSH environment variable. My config is described here
https://mstempl.netlify.app/post/ssh-agent-windows/ maybe that helps?