i've experienced the same issue. i believe this works:
- click the X to close the window
- that terminates the debug session
- then Cancel the window closure