Error when Camunda starts up in homogeneous cluster


We start up camunda as a homogeneous cluster (multiple spring-boot embedded process engines deployed as docker containers) connecting to a single database. The issue is that these when these containers are starting up at the same time in parallel, there are duplicate rows getting inserted in ACT_RE_PROCDEF and ACT_REF_DECISIONREF tables. This causes issues like

org.camunda.bpm.engine.ProcessEngineException: ENGINE-03070 Cannot resolve a unique process definition for key ‘myProcess’ because it exists for multiple tenants.

I am not supplying tenant id anywhere. I have seen a similar issue in where there was an issue while persisting history level to database concurrently. I think this was fixed by adding a property in ACT_GE_PROPERTY called startup.lock. Would the same solution work for the above problem? or is there a good way to tackle this?

Camunda version we are using is 7.13