Even after the powder reaction has ceased, there is still a great deal of pressure driving the bullet because the gas molecules are still at high temperatures and haven't gone anywhere. This is why a pistol-caliber rifle is still loud in long barrels, because even though the powder has all burned away (there wouldn't be any visible flash), there is still a great deal of pressure behind the bullet that is released upon exit, causing the report. Basically, the powder reaction has stopped well before velocities start to decrease (whether it is only a couple inches or a foot, I could not speculate).