Historically, indefinitely.
A case remarkable for its singular, improbable nature makes a poor argument for calculated policy.
I don't understand this notion of 'most legitimate heir' that keeps cropping up
Then pick a different name for it, "person whose claim to the throne could mobilize the most rubles, guns, and hands to hold them". Non-legitimate claimants may still gain the throne by force of arms motivated by virtue of their adjacency to the last legitimate holder of power. The law exists, but its ability to influence action and the ways it will be rhetorically implemented are not cut and dry. Legally, Peter I was a non-legitimate Tsar while Ivan V should have ruled alone, but de jure legitimacy and "that quality which will motivate believers in a feudal monarchy to support a candidate materially" are not one and the same. "Being the child of the last guy" is a rhetorically resonant plank for such a believer.
Has convinced me to disengage. Have a good night.