BTService class tick time in c++

I am creating by behavior tree’s service nodes in c++.

I have overridden the function

OnSearchStart(FBehaviorTreeSearchData& SearchData)

To execute my custom service. How even the problem is the delay doesn’t work perfectly.

The delay works in standalone game. And it also works when the editor is just started.

But, if I open the behaviortree blueprint while the game is still running or start the game when the behavior tree is open, the service starts to trigger each tick.

And this behavior doesn’t stop unless I restart the editor. But when I again test it in standalone, it all works good.

This is giving me a hard time testing stuff…