@whoremoan I believe your post describes an issue I have also been struggling with for some time, but recently made some headway in diagnosing. One thing, though - you included ADVMAME in your list...I haven't encountered the problem with that emulator, but have with the Libretro emulators (LR-MAME2003, etc).
There have been some issues reported in GitHub for Retroarch describing this same problem. For example, see https://github.com/libretro/RetroArch/issues/10780. There is a fix available (https://github.com/libretro/RetroArch/pull/11471) which is not yet available in Retropie, but will probably make it in fairly soon.
In the mean time, one thing you can try (again, this would only be for the Libretro emulators) is to enable the "Game Focus" after entering a game, which usually defaults to the Scroll Lock key (yes, a keyboard would be needed, though I believe you can remap the key within the Retroarch on-screen menus).
EDIT: Though enabling Game Focus can be used as a workaround, after further testing / playing I discovered that using the "Grab Mouse Toggle" instead is often all that is needed (Game Focus locks down keyboard inputs, which may be too restrictive depending on the hardware). The Grab Mouse Toggle defaults to F11 (+ hotkey), but can be redefined in the retroarch.cfg file (input_grab_mouse_toggle = "j", is what I'm using). Grab Mouse does what it advertises, and makes the OS mouse pointer 'disappear' and not interfere with the game's mouse pointer.