This is the PDF generated without changing the stylesheet:

If you add a header ("my header"), the formatting of the PDF will change.
Stylesheet with header added:

PDF generated after this change:

Why have some elements such as image size, caption, margins been changed?
*Perhaps Confluence is using different versions of the Export function for each document generated