In this case, it would be better to disable this option since it is not possible to avoid all such glitches. The idea behind this option is to load JS files only when the user starts interacting with the page.
It is a “Delay JS execution” by WP Rocket. It works in exactly the same way on desktop but scripts are executed right after you start moving your mouse. And on mobile devices, it starts when you tap somewhere on the screen and that is why you can see this problem sometimes.