A circular from IFAB read: "(When) the penalty taker accidentally kicks the ball with both feet simultaneously or the ball touches their non-kicking foot or leg immediately after the kick: If the kick is successful, it is retaken. If the kick is unsuccessful, an indirect free kick is awarded (unless the referee plays advantage when it clearly benefits the defending team) or, in the case of penalties (penalty shoot-out), the kick is recorded as missed.”
It added: "This situation is rare, and as it is not directly covered in Law 14, referees have understandably tended to penalise the kicker for having touched the ball again before it has touched another player, thus awarding an indirect free kick to the opposition or, in the case of penalties (penalty shoot-out), recording the kick as missed.
"However, this part of Law 14 is primarily intended for situations where the penalty taker deliberately touches the ball a second time before it has touched another player (e.g. when it rebounds from the goalpost(s) or crossbar without touching the goalkeeper). This is very different from the penalty taker accidentally kicking the ball with both feet simultaneously or touching the ball with their non-kicking foot or leg immediately after they have taken the kick, which usually occurs because they have slipped when taking it. Not penalising an accidental double touch would nevertheless be unfair, as the goalkeeper can be disadvantaged by the altered trajectory of the ball.”