One way to get around "on-death" succession issues is perhaps to allow for an interregnum - simulating the historical situations where the electors would not find out about the death of the liege instantly (and often were then required to travel -often quite a long distance away - to vote in person, or at least had to send word with a trusted courier as to whom they would like to choose). The Designated Regent would then continue to rule "in the name of" the deceased ruler until a set date on which a new one would be chosen.
But this is perhaps something for CK3, if/when it comes?