Mendix analyses microflows to determine what data it needs when it is called from the client. There are some cases where this analysis is not 100% correct because it cannot determine all the information needed. One example is when you are using java actions in a microflow. It looks like analysis of data required in microflows on entity events is also not 100% correct. The workaround is to disable the optimization. And as stated in the documentation, you can file ticket so we can have a look at your situation and improve the optimization analysis.
As stated in the documentation https://docs.mendix.com/refguide/project-settings#optimize-network-calls :
Optimize Network Calls
If this option is enabled (true
by default), Mendix analyzes every microflow that can be triggered from the client to minimize the number of objects required to be sent. This speeds up your app significantly.
If you experience an issue while running your app in which objects seem to be lost, this option can be disabled to resolve that issue. If this resolves the issue, please file a bug report so that we can fix the issue in the platform.