you’ve encountered my biggest issue with retroarch :) it’s because your select button is your hotkey (i’m guessing).

boring explanation here:
the retroarch input handler waits for the user to press the hotkey (select), when that happens it blocks ALL inputs as it’s watching for all the various hotkey combos (select + start = quit, etc). it just so happens it lets 1 frame of input go through at the start of this process, so anything that is only looking for 1 frame of select will work (which is MOST things that use select), but everything looking for me more will not (eg your issue, some mame games looking for more than 1 frame of a coin-input signal, etc)

– move the hotkey to another button
– use a non-retroarch emulator
– wait for a fix (which might be soon!): https://github.com/RetroPie/RetroPie-Setup/issues/1072

hope that helps!