In the last code snippet of this documentation page, we should be calling IsChildOf, not IsA. IsA(APawn::StaticClass()) will always return false when called on a UClass object.
Hey dbevolution-
I have entered a report to have the documentation page updated to reflect the correct call to make in this instance.
Cheers