I'm facing the same issue and I'm trying to use "Pessimistic Locking"
you can check this link: https://marketplace.mendix.com/link/component/109405
This project provides a simple solution for Pessimistic* Locking that stores record locks in the database and so will work for applications that have the potential of horizontal scalability.
The basic principle is to use the GUID of the object as the key for the lock record entity and apply a uniqueness constraint on the GUID. This prevents two locks from being created for the same object, even if a second transaction commences before the first is committed.
if this helps you please mark this as an accepted answer.
Thanks!