Choropleth Maps and Responsiveness

Hello,

I’ve been trying to make a Choropleth map I have embedded into an HTML page responsive to the window resizing. The map is created in python with Plotly Express and passed to the page with Jinja2 (I’m using Flask). On the page itself, I have the following JS:

  <div class="chart" id="map">
    <script>
      var graphs = {{map | safe}};
      var config = {displayModeBar: false, responsive: true};
      Plotly.plot('map', graphs.data, graphs.layout, config);
    </script>
  </div>

The displayModeBar is not showing as intended, but the responsive part is being ignored. The parent container along with the rest of the page is responsive (I am using Bootstrap4).
Is the responsive option only for bar graphs, pie charts, etc and not maps?

Any luck with this ?
I am also looking to make a choropleth map responsive.