These old-school utilities will do what you want it to.
Skip Task Manager when an app freezes: Windows 11 can terminate it directly from the task bar.