Why not just add this to your .zshrc ?
.zshrc
export PATH="/usr/local/bin:$PATH"
Since VS Code installs code to /usr/local/bin/code, you’re good to go.
code
/usr/local/bin/code
This way, it will work for other symlinks as well like brew.
brew