Clothing + animation: Playback is different from render, character "walks out" of clothes

The file I’m working with is here: https://u.pcloud.link/publink/show?code=XZqbBHXZiTNkyRgvGUJsUMe5TIySQzI4Bspk

The model is something random from MakeHuman, the BVH comes from the CMU Mocap databse, placed in Blender using the BVH Retargeter (diffeomorphic.blogspot. com/p/bvh-retargeter.html). and I followed the clothing simulation from this YouTube video youtube com/watch?v=HPz5gk_AT6w.

The not-rendered playback (i.e., pressing spacebar in Blender itself) runs it the way I expect it to be. Cloth does its thing, 20 frames later, character starts walking and the clothes just stay there.

BUT, when I use render (ctrl f12), I get this: https://u.pcloud.link/publink/show?code=XZNhBHXZsLxadcLIETh1HFGsS1SAXRzmh1W7 (see the first few frames only, I stopped rendering when I saw it was going wrong). The cloth works fine for the first few frames, and then when the character starts walking, it just “walks out” of the clothes.

I’m kinda new at this, so I’m not sure what I’m doing wrong.

Check for differences in render/preview settings on modifiers (especially armature, cloth physics for clothing objects) and consider baking physics.

Edit: looked at file but didn’t render. Modifiers look okay. Your cloth is set to only use 250 frames for its cache and your animation is longer than that (331 frames?) Look in properties/physics/cloth/cache. Consider baking physics.

Changing the cloth cache didn’t help.

Baking the physics worked, although there was still like one or two frames where the character was passing through the clothing.