RG resets cell order after updating DB

Hi guys.

I am using the Drag and Drop Repeating Group plugin. It’s been great to work with it. But right now I am struggling with something that you might be able to help me. I have a simple RG where users must be able to drag items around to reorder it. These items are chapters of a course. When the user moves an item and the reorder happens (for example the item 4 is moved to position 1), the database must be updated with this new order and, of course, the items of the RG must remain sorted, with item 4 now in its new position 1. However, what is happening is that after updating the database the cells of the RG are automatically reordered to its previous position. The database is updated but the RG shows a different order than the DB. While storing the sorted order in a custom state everything works well, but the moment I update the DB with the custom state the same weird behaviour happens.

I will add some screen shots to demonstrate what I am talking about. Hopefully you will be able to shed some light on the solution. Thanks a lot!

Screen Recording 2023-10-08 at 8.41.20 AM (3)