but not every state works like every other state
so in texas it might, but that soesnt mean all the other states do this
because not every state would assume they would automatically vote for the replacement person as they may find them objectionable, or worse in comparison to the other candidate still alive
Chances are that voters would think twice about voting for the substitute candidate at the last minute (or not vote at all), but (in Texas) the votes for the withdrawn candidate will count for the party, not the candidate directly, since according to the Constitution they are voting for Electors -- the candidates' names are for convenience only on the ballot.
-PJ