Tag Manager script leads to an endless loop of requests

Hi there,

the Tag Manager script leads to an endless loop of requests, which fills up the user’s memory.

Setup
There is a Matomo data layer implemented on the site. The basic config tag and page view works fine with the tag manager. As soon as we add a custom event or an ecommerce event (created based on the template), the Tag Manager script runs in an endless loop and creates a lot of events called mtm.CustomEvent.
Bildschirmfoto 2025-01-27 um 16.07.23

There is no event named CustomEvent in the data layer or in the tag manager. I have no idea where the CustomEvent is being generated from - I am guessing from a template.
Do you have any idea?