I could reproduce the issue with Hibernate 6.2.0.Final, when enabling query cache and a filter. I’ve added a link to an example that reproduces the bug.