Scatter_mapbox map resizes the mapbox-gl while moving the slider, slowly with many data, and fast with small data

Here is simple example of what I mean, When I move the cursor the mapbox-gl container resizes which creates jerky animations. Please help.

import as px
df =
fig = px.scatter_mapbox(df, lat="centroid_lat", lon="centroid_lon",color="peak_hour", size="car_hours",animation_frame="peak_hour",animation_group="car_hours",
                  color_continuous_scale=px.colors.cyclical.IceFire, size_max=15, zoom=10)