Apologies for a duplicate if this has been posted elsewhere, but I was searching for a solution to the [Esc] key simultaneously clearing a target and opening the game menu, and all of the results I found on Warmane's forums were expressing frustration but no solution other than a kinda half-baked workaround.

There is a small addon on Github called EscFix which - at least as far as the 30 minutes or so that I tested it - resolves this problem. Get it here:

https://github.com/Anyone0/EscFix

It restores the original functionality. If you changed your game menu keybind, you'll need to reset it to [Esc] for this addon to work correctly.

Cheers!