Tasks that are open in a process can’t be deleted - they can only be completed.
Deleting a task would leave the process in a ‘corrupted’ state - the execution does’t know where to go to (e.g. imagine doing doing this to a task that’s after a parallel gateway fork - what should the execution do?).
Have you looked at the process migration API? That might suit your use case.