If it was installed as a flatpak it's possible it didn't register in the PATH. Run flatpak list to verify if this is the case. I would suggest to install VSCode using deb package instead, since you will most likely want to use the integrated terminal anyway.
Uninstall from flatpak and then from the software store make sure the "source" selected is .deb and not flatpak.
Snap may be the issue since it creates another layer of obfuscation (unnecessarily) to protect system files. This may seem great, but it duplicates libraries (like the gtk2 & gtk3) each time you install another snap. It also causes you to have to find work arounds in order to get the software to communicate with the system where it would normally by itself. An ide should integrate with the system (its even in the very name... integrated development environment). Use apt or a .deb to install such software and use virtual environments to isolate libraries, installed packages and modules for each project. Snap may seem easier, but you'll run into headaches you can avoid by integrating, as it should be.