Hi Jones ,
I have just tried your test with Hibernate 6.2.1.Final and PostgreSQL and it does not fail.
p.s. : I first removed the Assertions.fail("Wrong group by and wrong order by generated (see log)");