Change write_image size without changing axis title size

Hi folks,

I have my axis font sizes explicitly set to 12 in my template. I noticed that when i manually set the figure size using fig.write_image, the font sizes change (in my case they are set to exactly 9).

Does anyone know a work around to keep the original axis size when exporting images?