I found that doing:
TArray<UGameplayAbility*> Instances = AbilitySpec->GetAbilityInstances();
for (auto Instance : Instances)
{
FPredictionKey InstancePredictionKey = Instance->GetCurrentActivationInfo().GetActivationPredictionKey();
}
Would show the correct prediction key
The issue can be fully resolved by changing Lyra’s code to:
void USandboxProjectAbilitySystemComponent::AbilitySpecInputReleased(FGameplayAbilitySpec& Spec)
{
Super::AbilitySpecInputReleased(Spec);
if(Spec.IsActive())
{
TArray<UGameplayAbility*> Instances = Spec.GetAbilityInstances();
const FGameplayAbilityActivationInfo& ActivationInfo = Instances.Last()->GetCurrentActivationInfoRef();
FPredictionKey OriginalPredictionKey = ActivationInfo.GetActivationPredictionKey();
InvokeReplicatedEvent(EAbilityGenericReplicatedEvent::InputReleased, Spec.Handle, OriginalPredictionKey);
}
}