The referenced entity (node:x) is invalid.

Getting this error saving a node with a newly added user reference. The userid is 2353. Users with lower numbers add fine. Seems to be only users with high userIDs.

https://www.drupal.org/project/entityreference_view_widget/issues/2286455

Seems to be related to the entity selection settings.

Changed to not performing sorting. This fixes the issue.

Probably was caused by out of memory sorting too large a list.