There is a rather silly bug in the Windows version, whereby the Front Matter feature does not correctly insert its contents into the compile settings that also generate metadata—the output just gets lost somewhere—unless front matter is being used for other things as well. It also works fine if that item gets to the top of the list in Compile through any other means that I seen, such as being at the top of the Draft folder, or when compiling a Collection as the designated compile group.
So if you have no need for “hot swapping” metadata, or use of the front matter feature otherwise (as I say, having something like a “Preface” as well will cause it to work, even though there isn’t a huge reason to do that with Markdown-based compiling), then the easiest solution is to drop that file into the top of the Draft folder. That makes the most sense anyway really, if all you’re doing is using the Front Matter feature to insert a file you always need and that’s all it does, there is no reason to even use the front matter feature.
Otherwise, if I do need the ability to hot-swap between different metadata sets, what I’ve had to do in some projects is migrate metadata settings out of the compiler and all into a file called anything other than “Metadata” / “Meta-data”, with a section type that will print it as-is. In that case it needs to be a fully valid metadata block (including the ---
lines before and after, for Pandoc). It’s nothing special at that point, it is text we’re inserting at the top of the document that matches the spec for what a YAML block should look like.