Problem/Motivation
There is a loop if a service needs the current User as an argument.
Steps to reproduce
Install Restrict by IP with composer and Lenient on D10.
Proposed resolution
Remove the unused variable of the current user in Drupal\content_moderation\EntityTypeInfo. Its usage was removed in a Drupal 8 version.
Remaining tasks
Make sure nothing calls the class Drupal\content_moderation\EntityTypeInfo with the current user as an argument.
I'm currently running a site with this patch for 2 months and had no issues.