When I start a batch job with sudo, terminating it will cause the shell to hang. It terminates but then the terminal gets all messed up, things are printed in the wrong place, keystrokes don't register anymore.

This happens too if you "sudo pwsh" and terminate a batch job started without sudo.
PowerShell 7.3.3, no profile