Adding or removing actors to the world must be done at the end of the tick by wrapping them in `world.AddFrameEndTask()`.