Secondary y issues when dump and load a Figure with Subplots

In my webapp Iā€™m trying to pass a chart for a fetch js function that allows you to download a report with that same chart.

The problem is that when in the other route I load the json object and try to assemble the chart, the secondary axes stop working properly. I no longer see the title and axis ticks.

Briefly, what I do is the following:

chart.show()
plotly.io.from_json(plotly.io.to_json(chart)).show()

First show:

Second show: