Thanks for reporting the issue and providing a reproducer. I removed the related JIRA since that was already solved while this is a confirmed bug still present in Hibernate 6.2.2.
I will soon create a PR with a proposed fix.