Description
When I use system Explorer to run this powershell file with Run with Powershell Context Menu Item, it works well.

But when I use Files to run powershell file with Run with Powershell Context Menu Item, I encounter this issue.

These are the contents of my ps1 file and I just want to run one dotnet run task.
dotnet run --project build/Build.csproj
exit $LASTEXITCODE;
Related file tree is like that:
Steps To Reproduce
- Create one VS project.
- Create ps1 file for it.
- Run this ps1 file.
Files Version
3.9.1.0
Windows Version
10.0.26100.3194
User ID
a2edf6d2-76d7-4004-bceb-5cd7ffa27d13
Log File
debug.log