Nintendo DS Emulators - Mouse Usage

When I click the left or right Mouse button to use it as touch device in DS games I will go directly to the windows desktop and retroarch is minimized. It happens with melonDS and Desmume cores. When I switch to usage of joystick as touch control in the core options it works for my analog stick of my gamepad flawlessly. Any idea how to solve my mouse problem? Toggle GameMode (F11) and auto capturing of the mouse in retroarch didn’t change anything