Cloudflare and Google Tag Manager together brings conflict on website functions

On our website, there are links behind our menu headings. On desktop, this link works and open the dropdown by hovering over it. On mobile this link does not work so when you click on it the dropdown opens.

Since November 2023 we noticed that this was no longer working. We found out that if we turned off our Google Analytics 4 - base configuration tag that the feature did work again. But well then we can’t measure anything anymore…

A week or 2 ago we thought we found the problem by disabling the cloudflare setting Rocket Loader™. Instead of the website functionality not working at all anymore, it now sporadically does not work.

We have disabled the GA$ - base configuration tag again but the problem seems to be caused by cloudflare. Has anyone experienced something similar and do you know the solution?