Collapse/hide triggering randomly, "fetch" error?

I have a page with custom forms and use collapse/hide often in the code to navigate between groups of input elements.

In Preview mode the sections often randomly disappear, I assume due to collapse/hide being triggered. In the published site, it happens much less frequently but still does once in a while and I would like to fix it.

I don’t see an issue in the code other than that it’s a bit complicated. I did get this error in the console log:

“Fetch event handler is recognized as no-op. No-op fetch handler may bring overhead during navigation. Consider removing the handler if possible.”

I wondered if that’s related to my issue but I don’t use fetch() anywhere on the site.

The issue happens on https://www.ferdasakman.com/astrology/consultations/ → anywhere after clicking “Fill out Info Form”

Please let me know if you have any suggestions.