This was already fixed on main by https://hibernate.atlassian.net/browse/HHH-16875.
The change hasn’t been backported to 6.2, but since the release of 6.3.0 should happend in the coming weeks it should be fine to wait for that.