The window only closes after pressing shorcut shift-esc or closing the local terminal tab. My environment is PhpStorm on Win 11.