AnimationPlayer caches animated nodes. It may not notice if a node disappears; clearCaches forces it to update the cache again.
See Implementation
AnimationPlayer caches animated nodes. It may not notice if a node disappears; clearCaches forces it to update the cache again.