UE5.4.2 C++ Project Build Fails After Any Change

is you have

TSubclassOf<GameplayAbility> StartupAbilities
or
TArray<FActiveGameplayEffectHandle> ActiveEffects

then you need the to include the headers for GameplayAbility and FActiveGameplayEffectHandle and their module.

Look at the uneal c++ documentation

Check the Include and module for both