It wasnt directly a goal kick. That ball was about to go out over the end line well outside the 6 yard goal area. The clarification is basically: "do not take a goal kick and use that to directly lift it or head it to a goal keeper." The ball was in play and Perisic juggled the ball up to his head and headed it to the GK. Thats been trickery forever. Its the textbook definition of trickery. Perisic gets the yellow for Unsporting Behavior (he committed the act of trickery) and the restart is an indirect free kick because the stoppage is the GK is illegally handling the ball inside their own penalty area. Technically I guess you could also card the GK for the act of handling but you shouldn't.