In the VS Code terminal is there a drop-down that looks as in the following?
If so then you can change from PowerShell to Command Prompt. I do not know if that will solve the problem but it is related to something Microsoft has done recently. Windows now has pseudoconsoles that are intended to be an improvement but they can also be extremely confusing. If you read about them you will see that you can install a new program called the Windows Terminal that is a new type of console. It was confusing for me because when I execute it I get PowerShell. Eventually I found The in and outs of Microsoft's new Windows Terminal • The Register that says there is a drop-down menu that lets you select which command line application - such as cmd, PowerShell, a Windows Subsystem for Linux distribution – you would like to use.