As much as I would like to say otherwise, under the laws, it’s a legit goal.
From the Advice to Referees on the Laws of the Game, page 37, and I quote:
“A defender who leaves the field during the course of play and does not immediately return must still be considered in determining where the second to last defender is for the purpose of judging which attackers are in an offside position. Such a defender is considered to be on the touchline or goal line closest to his or her off-field position. A defender who leaves the field with the referee’s permission (and who thus requires the referee’s permission to return) is not included in determining offside position.”
In other words, Panucci still counts even though he’s laying on the ground off the field.