FIFA rules say that if all the opposition players are back in their own half, or off the pitch then you can kick off.

Arsenal kicked off when Rose scored that wonder goal for Spurs and celebrated in his own half.

There must have been some directive to tell teams about it because a few sides have kept one of the players on the pitch when they've celebrated off it. https://www.si.com/soccer/2018/06/19...nts-quick-kick