Sometimes the child actor is destroyed for some reasons

You shouldn’t change a child actor component’s class at runtime. That’s why you are having weird errors. Try just setting the class in the editor, or why do you need to set it on begin play? What are you trying to achieve?