Never autoclose map window?

What XML or LUA should I create/modify to never autoclose the map window? Not with escape, not because something else happened like picking a Torghast anima power, not anything other than me either hitting the keybind to close it or clicking the X in the corner.

I’m a coder and even wrote several addons back in Classic, so even just a pointer to the right bits to modify would be much appreciated.