Why was France so uniquely successful at preventing foreign dynasties from inheriting its throne compared to other European monarchies?

From Hugh Capet in 987 to Louis-Philippe in 1848, every legitimate King of France belonged to the House of Capet (including the Valois and Bourbon branches). Meanwhile, most other European crowns regularly passed to foreign houses through marriage or election.
Why was France so uniquely successful at preventing foreign dynasties from inheriting its throne compared to other European monarchies?
Why was France so uniquely successful at preventing foreign dynasties from inheriting its throne compared to other European monarchies?
Post Opinion