Why did PSG lose the lead despite being equal with Benfica?

Paris Saint-Germain lost the top of its group in the Champions League, to Benfica, despite the two teams being equal in points, goals scored and received, and direct confrontations.
The two teams scored 14 points, scored 16 goals, and conceded 7 goals, Paris and Benfica tied in France and Portugal with the same result (1-1).
Benfica managed to snatch the lead from Saint-Germain, thanks to scoring 9 goals outside its stadium, while the Paris team scored only 6 goals, away from the Princes’ Garden.
According to the Opta statistics network, this is the first time that two teams have topped a group in the Champions League with the same points and the number of goals scored and received.
Paris Saint-Germain will likely have a difficult draw in the final price, because it is a candidate to face one of the following teams:
Chelsea – Bayern Munich – Manchester City – Napoli – Tottenham – Porto – Real Madrid