Law 7.4, from the IFAB Laws of the Game, states
If a penalty kick has to be taken or retaken, the half is extended until the penalty kick is completed.
Thus, the referee should blow the whistle to end play when the kick is completed.
Law 14.1, from the same source, states
The penalty kick is completed when the ball stops moving, goes out of play or the referee stops play for any infringement of the Laws.
This definition is reasonably straightforward: the game should continue despite time expiring until such a point as one of the above conditions is met.
Additional documents are intended for officials and the management of situations of special importance where the appropriate and lawful procedure or action may not be clear. However, while it does discuss various points around the taking of penalties and of timekeeping, this is not an area where further clarification is made.
Therefore, by a strict reading of the law as written, play continues until it naturally stops.