This is just a guess, since I’m not on a computer where I can check but... you seem to be viewing the Word document using the Preview app, not Word itself. How does it look in Word? My recollection is that Preview doesn’t always render every aspect of a .docx file perfectly, and maybe pandoc’s output is running afoul of this?