Get-Credential not Working with Hidden Console Window in EXE

Tool: Visual Studio Code
Version: 2022.11.0

Packaged a simple map network drive script that asks the user for credentials with the Get-Credential cmdlet. The EXE works fine if run from within powershell\terminal. No Console shows, as desired. However, when running the EXE Directly nothing happens. I have to Show the console in the package config for it to work correctly. Which gives me the large black window, which is not desired.

Is this a bug or am I doing something incorrectly?