I have also implemented my own record locking mechanism, and so far have not had any issues. I create a lock record in a separate entity rather than setting a flag field on the current record itself as you do. If the record is locked, I open a different view of the record that is read-only.
I could not use the Community Commons locking mechanism as we wished to be able to use more that one application node, and the locking in Community Commons is held in memory on the server node so cannot be shared across multiple nodes.
First, I guess in your question you mean you set the LockApplication to true, not false. So how can two users edit the same record...
I implemented the locking of community commons, and that works fine (e.g. as designed). However it is quite a drastic way of locking: when user 1 has opened record 1, user 2 is blocked (and informed that Mister x or y has opened the form)
As mentioned by me in the topic that you refer to: it is
[1] Quite some work to add this locking functionality (especially when you want to have this implemented application-wide)
[2] It is easy to make errors while modeling (forget to set or release locks somewhere), so I modeled very carefully
Therefore my feature request 7774 that asks for an application-wide setting with the flexibility to override this setting on data/template-grid level...
IMO this feature would be a great enhancement when recordlocking is required.
Read the literature about locking. You need a semaphore or lock that is guaranteed to be changed by only one 'client' at a time. Microflows in Mendix run concurrent. So that may be the cause.
Did you switch the microflow property: disallow concurrent execution?
Be sure in that microflow that everything is read from database, so do not use 'retrieve by association'.