Solution: Update your settings
Here's how to update your settings (from here):
Option 1:
Open the Settings editor:
On Windows/Linux - File > Preferences > Settings
On macOS - Code > Preferences > Settings
or use the keyboard shortcut (Ctrl+,).
Check the following box:
Extensions > Python > Terminal: Execute In File Dir.
or use the Search bar and type this setting id python.terminal.executeInFileDir.
Option 2:
Locate and open the user settings file:
Windows %APPDATA%\Code\User\settings.json
macOS $HOME/Library/Application Support/Code/User/settings.json
Linux $HOME/.config/Code/User/settings.json
Add this line: "python.terminal.executeInFileDir": true