registerBeforeCommitListener is registering a void function so you can not return false. Deleting the copies of the objects here won’t work as you found out.
Not changing a Marketplace module is a good design principle, but if your solution becomes too complex that price is too high.
A procedure to update and patch a module can be a good alternative.