I was running into the same issue and this is what solved it for me. When you open VS Code, the PowerShell console is loaded as an x64 application instead of an x86 application. The bottom right of VS Code shows the text “5.1” when running in x64 mode:
Click on the image with the “5.1” text and a menu appears at the top of VS Code that shows the following:

Select “Switch to: Windows PowerShell (x86)”. The PowerShell session will reload as x86 and the text will now be “5.1 (x86)” in the bottom right corner of VS Code now:
You will need to reload all of your PowerShell commands again to start your UDDashboard, but it should work this time around when starting your dashboards from VS Code.