Hi there! Do you know how you determine the primary key for the new object? Since when the primary key of the old object to delete is the same as the new object to create, we are effectively performing a modification on the old object. Could we check for the condition when the primary key overlaps and perform a modification on the existing object instead?
Extra context
When perform multiple ontology edits in the same function, function will attempts to merge them into a single edit operation if possible. For certain combinations of edits, such as deleting and then creating objects that may have overlapping primary key, contains some ambiguity and as far as I know is currently not supported in the merging process.