Maybe an issue with incorrectly setup dlete behavior in the domain model?
Or if you are deleting the data with the help of microflows this might cause an issue.
Issues can also arise when deleting data without using the delete behavior from java actions.
References are normally inserted and deleted in proper order, but when delete behavior is not set or implemented the referenced object might be deleted without the delete of the parent object e.g.
Another issue might be that the refrenced object is not saved when creating this object, then the object seems to be available while adding the data, but later on you will see that this record is not persisted in the db.
Another issue might be a modeling error where you have autocommited objects being created and automatically deleted by the platform as these are not explicitly saved.