That's difficult to say without additional context. But it could be that sometimes the receive task is initiated after Camel already tried to sent the response message back to the Activiti Engine.
BTW, we added support for asynchronous parallel gateways which should also solve the optimistic lock exception without the need for Camel. We plan to do a 5.15.2 release shortly that includes this new functionality.
Best regards,