try to print you PYTHONPATH environment variable from inside VSCode. I suspect that it doesn’t contain the path to your ROOT installation, and so it won’t be able to find ROOT.
The thisroot.sh script sets, among other environment variables, the PYTHONPATH, so the python interpreter finds root. The post linked above should help sourcing the script.
Alternatively, source the script on a terminal outside of VSCode, work out what the correct PYTHONPATH for finding ROOT is, and try to teach VSCode this path. I didn’t check it, but I’m pretty sure that you can append to the PYTHONPATH VSCode uses when it starts up the interpreter.