Using VS Code and Git Bash on Windows 10 with OpenSSH Agent

I’ve recently set up the Open SSH agent on my Windows machine, and created the keys using:

ssh-keygen -t ecdsa -b 521
ssh-add

I managed to set up my WSL to use this agent when SSHing from it (using WSL SSH Agent) but was struggling trying to get VS Code’s built-in Git support to work with it. I was getting permission denied (pubkey) messages.

I finally got it to work using this method, but that broke my Git Bash, which is now giving permission denied errors along with CreateProcessW failed error:193. If I remove the sshCommand line from my .gitconfig, Git Bash works again, but VS Code also breaks again.

So at this point I apparently have to choose which of the two to use. Is there a way to get them both to work while using Windows’ own Open SSH agent (and not 3rd party software)?