The problem is that I don;t know what other modules are doing. Its provided by other company. The modules are handling some ContentEntity and made specific things on it or accourding to data stored in that object. Those modules shares a UOW and changed the objects via UOW. After that the UOW is committed.
I'll try to contact other code providers to change it as you said, but I cannot be 100% sure that some other dev in the future modify the code or write other module and forget about it. The problem is that my module is at the end of the execution list and I want to safe my code against such problems in the future.
Its a very big problem for me because a problem occured in the production environment in my module. I know that a problem is not 100% my fault, but I need to prove it in the future and investigate which module change that. It would be much better if I could just filter such entities and wirte eventually a warn log, that someone has handled that inproperly, but my module will handle that data.
Its very rare situation but it happened for 1 user and he cannot work until I fix that.