I have used the same approach as you but I can’t remember if it was from a Flask based app (it may have been in a notebook). This link seems to confirm the approach:

https://plotly.com/python/configuration-options/

I wonder if, for some reason, the config info is lost in the conversion to JSON. If so, the solution might to to set the config parameters in the JavaScript:

https://plotly.com/javascript/configuration-options/

Sorry, but I’m not able to try it out just at the moment

Technology, data science and programming. LinkedIn: https://www.linkedin.com/in/alan-jones-032699100