Hi Seb, could you try to disable HTML encoding for your macro to see if that helps?
{% itemData.ApplyTransformation("custom.transformations.TestRpt")|(encode)false |(identity)GlobalAdministrator%}
This way, it shouldn't encode the HTML tags and therefore return expected HTML format.