Problem/Motivation
Upgraded the site from Drupal 9.5 to 10.1, using PHP 8.1.18.
Steps to reproduce
Upgrade the site from 9.5 to 10.1. Admin pages are loading fine after the upgrade. But the front end pages of the site are throwing this error "Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck(). in Drupal\Core\Entity\Query\Sql\Query->prepare() (line 141 of /app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php)"