Your personal holdings will pass on to your dynastical heir regardless.
If you lose the election then your personal demesne will pass on to a dynastical heir, but the elective title will change hands. The new election winner, however, will only keep his previous personal demesne.
If you lose the election then your personal demesne will pass on to a dynastical heir, but the elective title will change hands. The new election winner, however, will only keep his previous personal demesne.