It was changed to something else for MAMEUI? I tried using vanilla mame and P key works for pause but UI64 doesn't.
Although "Shift + P" for pause key frame key does work but you can't unpause the game and restarting emulator become only option.
EDIT:
oof I think default control were changed maybe? but if anyone curious you go tab > input > user interface > change the pause key default key or whatever you like