I tested your exact code, it works as expected, no issues found, the size of list is 2 after updating,
note that I used hibernate 6.6.9.Final as you mentioned.
It seems the problem is something else, please give me your project repository address for better debugging