If you had both scored in extra time, the away goal would have counted.

You have to be a bit careful with this is football, as it changes constantly and may actually be different depending on the competition.