Difference between played and rendered animation
Found the solution!
After completing the rendering of the scene you should free the bake of the objects by using: bpy.ops.ptcache.free_bake_all()

Hope that help to other ones as well.