Issue #3411290 by venugopp, sidharth_soman: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0
Closes #3097623