When it "disappears" is mame still running in the background? You can check taskman to see.
I've had issues before where mame will load and run, but for whatever reason, it'll end up minimized or worse, hidden.
If I recall correctly, it was because it'd run the game on a dual monitor machine, placed on one monitor (#2) and when I moved my setup to a single monitor machine, mame still loaded it to monitor 2.
Sounds like everything runs fine when started from the desktop though, so that may not be the prob.