Check out uirevision
📣 Preserving UI State, like Zoom, in dcc.Graph with uirevision that was created for exactly this purpose. TLDR: set fig.layout.uirevision=True
or any other truthy value and don’t change it until you want user-interaction changes dropped.
That said I see someone else was having problems with this specifically on a mapbox graph Uirevision + mapbox so perhaps I’ll head over there and see if they sorted it out.