There can be other scenario where you might be realising the lock ( using commit method) before this commit actullay happens. Like Bhavya said, to get the lock you can try using the method 'Obj-refresh and Lock" before commit step.
Thank you for posting your query on PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
We have also sent you a private message opening up a communication channel in case you have any further questions.
There is another scenario which results this exception.
1. Try to do Obj-Save (without commit) on a page which has errors(this will results an exception )
2. After that , clear the error
3. during the next commit operation , the Exception "Error Message: A commit cannot be performed because a deferred save of instance WESFARMERS-INS-WORK-POLICY-PERS-MOTOR CMOF12326476 failed: code: SQLState: Message:"will be triggered (because during this commit, the failed Save which was present in the differed list is also attempting to get committed resulting an error).