This is true but why allow the kick to be taken in the first place?
In soccer, when a defensive wall of at least three players is formed during a free kick, attacking players must stand at least one meter away from the wall until the ball is in play. If an attacker encroaches within that meter, an indirect free kick is awarded to the defending team,
according to TheFA.com. This rule was implemented to prevent disruptions and delays caused by attackers standing too close to the wall, according to The IFAB.