I may be wrong on this, but my understanding is the barrel remains locked to the SLIDE until the bullet has left the muzzle. The slide/barrel have already started to move backwards together however so there is some (albeit an insignificant amount) of energy being bled away.
The slide does not start to move backwards until it is unlocked form the barrel which does not happen until the bullet leaves the muzzle. The barrel does not move backwards at all except slightly to disengage from the slide.
The barrel can not disengage from the slide until the pressure drops enough for the barrel to unlock. The pressure is not low enough until the bullet exits.