/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_GameplayTaskBase.h
In your ExecuteTask:
class UBTTask_GameplayTaskBase : public [UBTTaskNode](API\Runtime\AIModule\BehaviorTree\UBTTaskNode)
uint32:  1
bWaitForGameplayTask
If set, behavior tree task will wait until gameplay tasks finishes