org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'DELETE TaskEntity failed'


I have a requirement similar to the case mentioned in the document link above.

‘However, this behavior is a heuristic, meaning that the job executor can only enforce sequential execution of the jobs that are available during lookup time . If a potentially conflicting job is created after that, it may be processed by another job execution thread in parallel.’

How can this be handled.
I tried making the exclusive gateway Async.
But still getting OptimisticLockingException.

Could you please help with this ?