Fortunately, Visual Studio Code has a little terminal you can use to run commands without needing to swap between windows.
The December 2023 update to Python in Visual Studio Code introduces several new features, including configurable debugging options that are now available on the Run button menu. [Click on image for ...