GAS EndAbility doesn't clean up properly if invoked when the ability has an active scope lock

In GameplayAbility.cpp::603, UGameplayAbility::EndAbility sets bIsAbilityEnding to true and then adds the ability to a wait list.

However, when the scope lock is released and EndAbility is invoked once again, the IsEndAbilityValid function guarding the whole EndAbility function will think the invocation is not valid since bIsAbilityEnding is already marked true. Skipping all the clean up logic after that.

Consider adding another bIsEndAbilityScheduled flag to ability, and set bIsAbilityEnding back to false when the invocation is blocked by the ability’s scope lock.