"She has lost the key to her car."
Translation:Elle a perdu la clé de sa voiture.
because the direct complement (la clé ) is after the auxiliary "a" (from avoir) "elle a perdu la clé" but "elle l'a perdue " (l' representing la clé)
The last thing I get (elle l'a perdue), but I would say in the first case 'perdue' relates to 'elle', which is feminine, and should therefore be perdue also.. ?
Auxiliary AVOIR the past participle (in this case perdu) agrees with the direct complement if it is before the verb (in this case the direct complement is "la clé" and it is AFTER the verb). The past participle does not agree with the subject.