Launching VS Code as the editor with CLI commands

auth0 branding templates update

The default editor for zsh is set to VS Code and it launches fine. However, it immediately somehow closes the session giving an empty editor window with the browser returning an error that it is not able to connect to the local host preview window.

I disabled all the workspace security settings in VS Code as well. Anyone have any idea why this could be happening or how it could be fixed?

*note: Using vim as the editor works fine.