SVG-Element Dynamic Data not working with custom function

Browser: Firefox 122.0.1
OS: Windows

I’m trying to use the new dynamic data feature of the svg-element to open svgs inside my theme (very handy for multisite-installations), but it won’t return my svgs (they are sanatized).

Underneath is my code and my options inside bricks and a var_dump to prove that the $svg contains the file.



Best regards,
Suat

Edit:
when working with echo instead of return the svgs are being displayed but also every use of the svgs creates an svg on top of the builder and canvas

I still have this problem on multiple sites. Is there a way to bump this?^^