Hi @kylemd,
You can try below code to prevent AEM from removing that expression.
<sly data-sly-test.profileName="${profile.name}">
<p>${profileName}</p>
</sly>
To prevent AEM from removing the expression and treating it as a string literal, you can use the sly block to wrap it. By using the sly block with the data-sly-test attribute, you ensure that AEM doesn't remove expression from the code during publishing.