dcc.Graph: How to force figure's layout to refresh after the class of its container was updated (bootstrap + sidebar + responsive)

I tried this How to force dcc.Graph to resize?
this Plotly resize bug using html.Details / hidden Div and width=100%
checked this Is it possible to update just `layout`, not whole `figure` of Graph in callback?
found this https://github.com/plotly/plotly.js/issues/2769
But im still struggling with this layout which doesnt want to update the width of the figure correctly