Metadata out of sync error after updating User through JavaScript

Hi,

I'm updating a user through JavaScript ilke this:

    const userBean = app.data.createBean('Users', {id: app.user.id});
    userBean.set('has_read', true);
    userBean.save();

The save operation works, but after the user has been updated I keep getting 'metadata out of sync error', till I refresh the browser.

{
  error: "metadata_out_of_date"
  error_message: "Your metadata or user hash did not match the server. Please resync your metadata."
  metadata_hash: "f86c8baca62aea11496e614fe9710954"
  user_hash: "102b9d1cd65dbe95f50ddfd6b2a45bc5"
}

What am I missing?

I'm working on Sugar 11.x

Any help appreciated. Thank you.

Volkan