This Java action calls storeFileDocumentContent and this automatically commits when content is stored.
https://apidocs.rnd.mendix.com/6/runtime/com/mendix/core/component/ICore.html#storeFileDocumentContent-com.mendix.systemwideinterfaces.core.IContext-com.mendix.systemwideinterfaces.core.IMendixObject-java.lang.String-java.io.InputStream-
There isn’t much you can do about this.