We can’t control the origin of the head tags, so it would be safer to sanitize and escape the tags ourselves.
As a head-tags PHP plugin user
I want to be protected from random bad input or malicious input in head tags
so that my Frontity site is never compromised
Follow this guide from VIP: https://wpvip.com/documentation/vip-go/validating-sanitizing-and-escaping/