Most referees would interpret this as going against the 2020/21 Laws of the Game. Take your pick:
- Impeding the progress of an opponent without contact
Impeding the progress of an opponent means moving into the opponent’s path to obstruct, block, slow down or force a change of direction when the ball is not within playing distance of either player.
- Playing in a dangerous manner
Playing in a dangerous manner is any action that, while trying to play the ball, threatens injury to someone (including the player themself) and includes preventing a nearby opponent from playing the ball for fear of injury.
Personally, I would call Impeding the progress of an opponent without contact which results in a restart of an indirect free kick at the spot of the offense. Also, I believe most referees would not give a yellow card for this unless the offender's intention was to waste time.