First of all, I apologize that we did not communicate with you correctly in the first place. Please consider that this is a customization request and outside of our support scope. We will do our best to help you out but we will not be able to implement the feature.
The reason that the mobile opens and closes immediately should be in the original code and we should not add additional code for that.
But in general, I suggest that you avoid having the feature in mobile as there are many factors that matter when it comes to touch devices which it is nearly impossible to be able to have a correct code.
That is why I suggest that you keep the code only for the desktop and use the hide during breakpoint options to hide all those sections on small screens and instead add a section which will show only on small screens and use the Accordion element or any element you see it fit to add separate data for them.
Thank you for you understanding.