Powershell works the other way. You have to specify the -NoExit switch to keep it running after executing a command or a .ps1 file.
Your main issue is one that we see quite frequently. User writes a script. User runs script just fine in desktop session. User tries to run in task scheduler (or startup) but doesn't get expected results. User does not include any error handling or logging in the code and has no visibility into what the unattended script did. User asks us what is wrong with the task scheduler.
The simple solution is to include Out-File cmdlets in the script to write to a log file. If you need more detail, PS's Start-Transcript/Stop-Transcript might provide more info. Write out script start and end times. Put a try/catch around the main code block and write any error to your log file.
If the log/transcript files aren't being created, then PS itself must be running into some kind of fatal error. You then need to capture stdout and stderr from PowerShell.exe to see the error. That's where the bat file comes into play.
For low level debugging use Sysinternal's Process Monitor to trace what Powershell.exe does.
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
The task scheduler is perfectly capable of running powershell.exe directly. Once you implement error handling and logging in your script, you should be able to remove the bat file.