Mamewah loses focus on some games too. I have to hit alt / tab to regain focus. I didn't have this problem with earlier versions.
SF alpha 3 is one that would lose focus and rampage world tour. There are others too.
I don't really understand how this would happen, particularly for only some games, but again, try the {safelaunch} flag in the commandline_format.
The fact that he mentioned to button-mashing syle games gets my attention.
If you have an iPac or similar programmable interface, I suggest downloading the appropriate programming software and disabling the shifted keys. I've found that when my partner or her daughter play my cab, they mash so many buttons simultaneously that they somehow hit a sequence of keys at the right time that switches back to the desktop, brings up the MAME config interface, or other weird things. There are numerous other threads on the same topic, most of which seem to indicate the problem is only noticed when kids or partners are madly button bashing.

Also, within WindowsXP the system defaults to asking the user if they want CAPSLOCK turned on if they hit the SHIFT button 5 times in a row. This can be a problem with 4/6 button games. I believe this has somethnig to do with the Accessibility Options in Control Panel ("sticky keys" I think).
As MinWah said, I doubt highly this is MAMEWah's fault (or any other FE for that matter).