Retroarch android touch and gamepad issue

Hi, I am using Retroarch 1.19.1 on Android and having some issue with the touch screen. If I am using Retroarch with no physical controller attached, the menu can be navigated by using the touchscreen just as normal. Playing Nintendo DS games also works fine by touching the screen. BUT If I connnect a controller, then the touch screen is disabled automatically. So neither the menu, nor the Nintendo DS screen cannot be controled by touching the screen. What is the issue here? I checked in the User Interface menu and Touch support is still activated regardless I have a controller attached or not. Thanks!