Accessing C++ 'Native class' and it's variables from a UBlueprint object

try accessing it via

UBlueprint* Bp = Cast<UBlueprint>(InAsset);
UClass* Class = Bp->GeneratedClass;
UObject* CDO = Class->GetDefaultObject();
UMyGameplayAbility* Ability = Cast<UMyGameplayAbility>(CDO);

You might want to validate each step with a check