Often, you can't.
I've had flights with the same number or different flight numbers entail "change of gauge" or even the same aircraft where we were required to exit the aircraft.
I can't recall remaining aboard on AA for a while - though it's quite common on WN.