Dropdown closes automatically


I’m currently facing an issue on my navbar on mobile. There a are a few dropdowns inside, and, in mobile, when the user clicks on a dropdown, it opens fine, but it closes automatically after 4 or 5 seconds. I have absolutely no idea where could it come from.
Another tiny issue : the arrow rotates with a delay when the dropdown’s state changes, and I couldn’t remove this delay.

EDIT : I made my navbar with a custom JS script, because the native navbar didn’t fit my needs. It looks like the script doesn’t work in read-only mode.

Here is my public share link: [Preview link]
Here is the live preview, with all the scripts working : Live demo