Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!
Currently, Microsoft Purview's Data Loss Prevention (DLP) policies don’t directly support targeting only the headers and footers within the content of attached documents. The options you see like "Header matches patterns" or "Header contains words or phrases" are indeed focused on email message headers, not document headers or footers within attachments.
Appreciate if you could share the feedback on our feedback channel. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.
I hope this information helps. Please do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.