If you make a longer chain than the rest of the network, then self-interested miners are going to switch to mining on top of your chain instead of risking their work on the old chain being for nothing. If the attack is short, then surely most miners won't be upgraded to be picky about chains in the time after the attack, and everyone else will know that and won't bother trying to make their miners prefer a losing chain.
If the point of the 51% attack is profit-oriented, then the attacker is going to do it long enough to get their double-spend confirmed and then stop doing the 51% attack.
If the point of the 51% attack is profit-oriented, then the attacker is going to do it long enough to get their double-spend confirmed and then stop doing the 51% attack.