Strange phenomena of x-axis and y-axis linewidth

When using the simple_white theme in jupyter notebook, I found that the first appearance of xaixs linewidth is different from that of yaxis linewidth, but the later appearance of the graph will have the same linewidth. But when you rerun the exact same code, the lineweights of both axes are the same. I donโ€™t know why this phenomenon occurs.
Similarly, even if I donโ€™t use the simple_white theme but just set the linewidth, the same problem will occur.

The code is:

import as px

df =
df_2007 = df.query("year==2007")

for template in ["simple_white","simple_white"]:
    fig = px.scatter(df_2007,
                     x="gdpPercap", y="lifeExp", size="pop", color="continent",
                     log_x=True, size_max=60,
                     template=template, title="Gapminder 2007: '%s' theme" % template)



As shown in the picture, the x-axis and y-axis line widths of the first figure are different, while the second figure is the same, even though the code is identical.

When I run jupyter files in vscode or pycharm, the linewidth of xaxis and yaxis is always not equal.