Problem with order when updating a record linked through a has-many relationship
## Bug report

### Required System information

<!-- Please ensure you are using the Node LTS version (18, 20, or 22) -->
<!-- Strapi v3 is no longer supported, please update to Strapi v4 -->
<!-- If you are reporting a frontend bug please provide error logs after setting STRAPI_ENFORCE_SOURCEMAPS=true in your .env -->
<!-- This environment variable makes frontend errors easier to read and trace -->

- Node.js version: 20.16.0
- NPM version: 10.8.1
- Strapi version: 5.7.0 and previows
- Database: postgresql

### Describe the bug

In my case, I have two collections: faq_categories and faqs. faq_categories has a has_many relationship with faqs. When I update an faq linked to an faq_category and publish it, the record is destroyed and a new one is created. However, in the join table, the faq_order value for the new record changes it moves to the end of the list.

### Steps to reproduce the behavior

1. Go to related record (ex: faq foo)
2. Change a field save and publish (ex: answer from 'foo' to 'updated foo')
3. Call the APIs to check the order in which they are returned
4. See that the position are changed

### Expected behavior

I expect that updating a record does not change its position and that the sorting remains the same.

### Screenshots

![image](https://github.com/user-attachments/assets/621fc4e6-6f4f-4961-b338-88a96078737f)

![image](https://github.com/user-attachments/assets/a5e85300-c97c-4926-b23a-01202e4284fa)

![image](https://github.com/user-attachments/assets/5939d366-2636-4077-a331-6a9974fd1ed9)

![image](https://github.com/user-attachments/assets/0c66c1c6-2c43-4dfb-9956-7edc2da3f736)

![image](https://github.com/user-attachments/assets/804cb99a-14de-4efb-9f15-cc8adb17841e)

![image](https://github.com/user-attachments/assets/cef7fabd-e6e2-4d86-a378-53c38a837aaa)
