Performance degradation of Criteria API queries with cached results in Hibernate 6.x and 7.x versions

Like I already wrote:

I agree that the use case with filtering is problematic and we should fix that, but first, we need you to create the ticket and PR that demonstrates the problem.