Plotly HTML freezes upon opening, the same, unchanged script used to produce working html files

I have been using a script to produce html files with scatter plots for some time now. I use these files to check if an algorithm for ECG peak detection worked correctly. Out of the blue, without updating anything, the script started to produce HTML files, that freeze up upon opening. I tried running the script on old data, and still the same result, I have no idea what is going on.

The simple function/method that is used:

    def visualization(self, ecg_x, ecg_y, peaks, marker = ""):
        peak_value = np.zeros(len(ecg_x), dtype=bool)
        peak_value[peaks] = True
        dataset = pd.DataFrame({'Xos': ecg_x, 'Yos': ecg_y, "barva": peak_value})

        fig = px.scatter(dataset, x="Xos", y="Yos", color="barva", color_discrete_sequence=["white", "black"])
        fig.write_html(f"{self.path}{self.datum}_{marker}.html")

A sample of a working (old) and non working (new) html file:

The HTML files are now, that they don’t work anymore, ever so slightly smaller (102 vs. 110 mb)

Any ideas as to what might be going on? Thank you in advance for any input.

Tried Scattergl(), didn’t help either.

Found the problem, it’s the plotly.js version change. So apparently I DID update plotly without knowing, if I run the script with any python plotly version up to 4.14.3 it still works, and stops working at 5.0.0. That is when the jump from plotly js. 1.58 to 2.XX was made, I’ve tested it across multiple computers and browsers and is consistent, somebody should take a look a the bug.