Looks like this is the expected behavior, and it's described here: https://stackoverflow.com/questions/52873025/pyqt5-qlistview-drag-and-drop-creates-new-hidden-items
When an item moves from position i to position j, what is done is:
Insert an item in position j
Copy the data to the new item, at this moment the itemChanged signal is emitted and therefore you see that there are elements of more
Delete the item that was in the position i.
So my question is: which method should I use to save the data after the item in the position i was deleted?
At the moment it looks like I have to save the data in one of the 2 places:
in dropEvent() of my TreeView
in a method called by itemChanged() of the model, where I'll have to compare the model indexes to distinguish between the new and the old position of the element