diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php
index 1fd99dc..b24610a 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php
@@ -222,8 +222,8 @@ protected function copyFormValuesToEntity(EntityInterface $entity, array $form,
     // by simply copying from top-level form values. This leaves the fields
     // that are not being edited within this form untouched.
     foreach ($form_state->getValues() as $name => $values) {
-      if ($entity->hasField($name) && !isset($extracted[$name])) {
-        $entity->set($name, $values);
+      if (!isset($extracted[$name])) {
+        $entity->$name = $values;
       }
     }
   }
