AJAX SettingsCommand Usage
Yes you need one more command to set the data back to nothing before you can overide it from trial and error the "merge" FALSE does nothing.
so ... 

// $response = new AjaxResponse();
// If want to replace you need to empty the array first.
$response-&gt;addCommand(new SettingsCommand([
  'MyData' =&gt; [],
], TRUE));
// then add new ones.
$response-&gt;addCommand(new SettingsCommand([
  'MyData' =&gt; [
    'New' =&gt; 'New values'
  ],
], TRUE));


See my New full example:  https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Ajax%21SettingsCommand.php/class/SettingsCommand/8.6.x#comment-64379