BeginOverlap function does not get called for the character C++ CapsuleComponent

Try moving where you assign the begin overlap to begin play