The block which includes double-spent is invalid. When an honest node chooses the "strongest" chain it should check block If it's valid, not just look at a number of confirmations.
This is also true for blockchain browsers(and their api), which apps use to confirm the transaction(most of users don't run full node). The only way how 51% attack can be successful in the long term is that honest nodes(and blockchain browsers api) are re-configure to ignore double-spent(at least for a particular time period).