Try the same method like for yaxis, but for xaxis make the following update:
fig.update_xaxes(tickangle=-45) # or tickangle=45
I think in your attempt it didnβt work for xaxis, because the ticklabel string is too long. It is possible that the above set tickangle to lead to the desired plot.