Hola @diego_admin y @alberto_lab,
@alberto_lab tiene toda la razón. El problema principal es que Smarty interpreta las llaves {}. Para evitar esto, es fundamental usar el bloque {literal}.
La forma más limpia de hacer esto en un tema hijo sin modificar el tema padre directamente, y asegurando que Smarty no interfiera, es la siguiente. Deberías modificar tu themes/tu_tema_hijo/_partials/head.tpl y asegurarte de que tu código GTM esté dentro de un bloque head_javascript_early y envuelto en {literal}.
Aquí te muestro cómo debería quedar tu snippet:
<head>
{block name='head_charset'}<meta charset="utf-8">{/block}
{block name='head_ie_compatibility'}<meta http-equiv="x-ua-compatible" content="ie=edge">{/block}
{block name='head_javascript_early'}
<!-- Google Tag Manager -->
<script>
{literal}
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
Al usar {block name='head_javascript_early'}, te aseguras de que tu script se cargue al principio del <head> y de que tu modificación esté aislada para futuras actualizaciones del tema padre. Recuerda limpiar la caché de Smarty después de hacer los cambios.