answered 2020-09-06 05:53:34 -0600
After updating to version EnergyPlus 9.4.0 IO Freeze, I notice the runtime API has changed introducing a new StateManager. Using this version and adapting the code, the issue disappears.
Hope this helps