What happened?
Description
We use a matrix field as our content builder. When we edit an existing entry in the matrix, then add a new one or delete an existing one and then save the entry, all changes are lost.
Steps to reproduce
-
Create a new matrix field
-
Add some entry types (e.g. 'Plain Text')
-
Add the matrix field to a section
-
Create a new entry in the section
-
Add an entry to the matrix 
-
Save the entry using Ctrl+S
-
Modify the created entry
-
Add a new entry to the matrix

-
Save again
-
All the changes are lost

Expected behavior
The modified matrix entry should be saved after saving the entry.
Actual behavior
Changes on a modified entry are lost, after adding a new entry to the matrix.
Craft CMS version
5.1.6
PHP version
8.3
Operating system and version
Linux
Database type and version
MariaDB 10.6
Image driver and version
No response
Installed plugins and versions
- CKEditor 4.0.6
- Dumper 5.0.1
- SEO v5.0.0-rc2
What happened?
Description
We use a matrix field as our content builder. When we edit an existing entry in the matrix, then add a new one or delete an existing one and then save the entry, all changes are lost.
Steps to reproduce
Create a new matrix field
Add some entry types (e.g. 'Plain Text')
Add the matrix field to a section
Create a new entry in the section
Add an entry to the matrix
Save the entry using Ctrl+S
Modify the created entry
Add a new entry to the matrix

Save again
All the changes are lost

Expected behavior
The modified matrix entry should be saved after saving the entry.
Actual behavior
Changes on a modified entry are lost, after adding a new entry to the matrix.
Craft CMS version
5.1.6
PHP version
8.3
Operating system and version
Linux
Database type and version
MariaDB 10.6
Image driver and version
No response
Installed plugins and versions