Well, Hibernate ORM 5 and before by default behaved as if you configure hibernate.cache.query_cache_layout=shallow: Hibernate ORM User Guide
But then Hibernate ORM 6+ will also fetch data according to the configured laziness of the entity class, even if data is not in the cache. I believe ORM 5 just took what was there and you could end up with LazyInitializationException later. I don’t know your exact model, but I would suggest you to print the SQL queries that are executed as well to see if more queries are being executed with Hibernate ORM 6+.