diff --git a/core/modules/node/src/NodeGrantDatabaseStorage.php b/core/modules/node/src/NodeGrantDatabaseStorage.php
index d9e8d5c..c0943d4 100644
--- a/core/modules/node/src/NodeGrantDatabaseStorage.php
+++ b/core/modules/node/src/NodeGrantDatabaseStorage.php
@@ -186,7 +186,16 @@ public function alterQuery($query, array $tables, $op, AccountInterface $account
         // Now handle entities.
         $subquery->where("$nalias.$field = na.nid");
 
-        $query->exists($subquery);
+        // If it's a left join to entity table and entity does not exist (i.e.
+        // entity_id is null) then skip access check.
+        if ($tableinfo['join type'] == 'LEFT') {
+          $subquery_cond = db_or();
+          $subquery_cond->exists($subquery);
+          $subquery_cond->isNull("$nalias.$field");
+          $query->condition($subquery_cond);
+        } else {
+          $query->exists($subquery);
+        }
       }
     }
   }
