Thanks Phil and Jim, who also replied to me.
In both dataset drafts which cannot be deleted the error message says they cannot be deleted because "Key (id)=(XXX) is still referenced from table \"datafilecategory\"".
Looking into the database, I found that the values in table datafilecategory that are referencing to the dataset id (XXX) are customized file tags, the first one "corpus", the second one "data".
Although I deleted those tags from the files in both dataset drafts, I still find the tags in table datafilecategory. Comparing with other datasets having file tags, I see that the database stores one unique value (e.g. "Data") per dataset, so if you, e.g., have tagged 4 files with "Data" and 2 files with "Documentation", there are two values stored in table datafilecategory for that dataset, "Data" and "Documentation".
I tried to reproduce the error on
https://demo.dataverse.org/ (v.5.10.1) creating a dataset draft with a file with a customized file tag. I was able to delete the draft without problems.
As I mentioned, both dataset drafts were created back in 2015; I guess that was before the upgrade to v.4?
Is there a safe way to delete these dataset drafts? Maybe we could try to remove the two problematic entries in table datafilecategory, and then try to delete the dataset drafts?
Best, Philipp