Annotated heatmap text center justified on chart creation but moves when exported

I have an annotated heatmap that looks fine when created but the text moves when I export to png.
Is there any option to center justify heatmap annotations to stop this from happening? See pic below.



Can you share your graph’s URL or a reproducible code snippet?



setting the horizontal text anchor (the xanchor attribute) to 'left' should do the trick

Here’s what that gave me:

Thanks Etienne that’s worked.
The native version of the graph now looks wrong but the export is correct - which is what I’m after.

Thanks again!