Quick answer: Unreal foliage casting shadows in the wrong positions after a runtime replant? The shadow cache wasn't invalidated - mark the ISM component dirty or call BuildTreeIfOutdated.

Procedural foliage moves trees post-spawn. Shadows stay in the original locations until the camera moves far enough to flush.

Invalidate the shadow cache

ISM->MarkRenderStateDirty();
ISM->BuildTreeIfOutdated(true, true);

Forces both the spatial tree and shadow caches to refresh.

Disable cached shadows

For dynamic foliage, on the light's Use Inset Shadow For Movable Meshes off. Cached shadows cost performance but stale shadows look worse.

Use HISM if available

HierarchicalInstancedStaticMesh handles updates better than plain ISM. Migration is property-only in most cases.

“Shadow caches are cached for a reason. Telling them to invalidate is your responsibility.”

Profile shadow cost before changing strategy. Cached shadows are a meaningful win; throwing them away to fix one bug is the wrong trade.