Interesting.
Short answer: press the tab button slower.
Long answer: I thought I wasn't having any problems with "P or Tab" mapped for pause and pressing tab, and then I started pressing and releasing the tab key faster. If I press tab quickly,
sometimes mame doesn't pause when going into the UI menu. If I press and release tab slowly, the game pauses and I go into the UI menu (actually, the pause toggles). Coming
out of the menu with tab seems to always toggle pause.
Could you give a reference to when it last "worked beautifully"?
BTW, why do you
always want to pause when you go into the UI menu? Hopefully the stuff you change are a set and forget once only stuff, and hopefully that's done before you get in the middle of a game. (I know auto pausing might help as a better UI in most
players cases, but I don't see it for developers.) If you want it that bad, and can find when it last worked as you want, you might want to post it as a minor (or feature) bug at
mametesters.