ok so if you just run whatever python is in your path as ‘python’:
does the version match the one you used in IDLE?
python --version
will give you the same information also.
You could try checking what your PATH is by using the instructions here:
you could also look up where your visual studio is pointing to python? Is it just VS, or VS Code?