Legend click when xaxis type is date

Hi!

for example:

I have simple data

var trace = {
  x: [1, 2],
   //x: ["2021-06-07 00:00", "2021-06-07 16:32"],
  y: [1,2],
  type: 'scatter'
};
var data = [trace];
var layout = {
  showlegend: true,
  legend: {x: 1,y: 0.5}};

Plotly.newPlot('myDiv', data, layout, {showSendToCloud: true});

when x = [1,2] (numbers) and I click on legend, xaxis does not change.

But, if x: [“2021-06-07 00:00”, “2021-06-07 16:32”] (dateTime) and I click on legend, xaxis is reset.

why is this happening and is there any way to avoid it?