@WeirdWriter Do you use a shell script or make/just/build file for creating your books?
There is an obscene way of syncing styles in Word and Libreoffice documents. The docx file is a zip archive, so I usually created a template.docx file that had the actual style I wanted based on the style names that Pandoc generates. Then I extract things like the style (word/styles.xml) or header (word/header1.xml) from the template and update that file in the resulting file after Pandoc generates it.
It is graceless and kind of a heavy stick, but it's a technique I've used since the 2000s but it keeps working.
I could look into doing it properly, if you want too. :D
@WeirdWriter Looking at my old notes, I see that I was adding page numbers into the template-story.docx with Word and the resulting Pandoc generated file has the page numbers. I don't have the old templates, but I grab someone's template and got it working.
Maybe Word is inserting page numbers differently?
@WeirdWriter That is assuming you can use Word's numbers in the template file's header instead of using pandoc's page_number.
Sadly, the template functionality of Pandoc isn't as robust as the other formats.