Every time I install one of the JetBrains IDEs I have to do this https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003508579-How-to-stop-Escape-from-Leaving-Terminal
When you use a terminal window you press Esc all the time if you know how to do command line editing - which I do.
It's a stupid default