I was not using the most recent versions of PlotlyBase, PlotlyJS and Dash; with the updated packages it works well.