Multiple Configurations in Matomo Tag Manager

Hey guys, I am looking for a solution to activate cookies whenever a user consents to using cookies, while having cookieless tracking active if he/she doesn’t. Therefore I created two Matomo Configuration tags in Matomo Tag Manager – but as soon as they go live, only one of the two configurations will work. I tried. Obviously, I’m doing something wrong here – can you guys tell me what?