Click legend to isolate trace not working when Plotly.react(...) a few times per second

Hi,
I refresh a plot a bit less than 10 times per second with the following JS code. It works:

const get_data = () => {
    fetch("/data").then(r => r.json()).then(data => {
        dataList1 = data["y"];
        Plotly.react('plot', [{y: dataList1, mode: 'lines', name: "A"}]);
        setTimeout(get_data, 100);
        ...

However the “click on legend trace name to isolate one trace” feature doesn’t work, because it is quickly refreshed/erased by the next Plotly.react call.

Question: when refreshing a plot fast, how to keep this useful feature “click on legend to isolate one trace”?

Thank you

Does anoyone have an idea?