Entity query returns wrong NID
The return value of Query::execute,


  int|array Returns an integer for count queries or an array of ids. The
  values of the array are always entity ids. The keys will be revision
  ids if the entity supports revision and entity ids if not.


Nodes support revisions so the keys will be revision ids and not entity ids.

$nodes = \Drupal\node\Entity\Node::loadMultiple(array_values($result));