Error in order of records in child panel

I have a parent-child screen with automatic ordering in the child panel. Adding and saving a new row works well, the OrderMember column values increase correctly. But at some point, when I delete more child rows and save only after deleting them all, the values of all child records for all master records turn to 1.

image