The cannon ball accelerates along the barrel only when there is a force behind it.
As soon as it leaves the barrel the forces vanishes and the cannon ball moves at a constant velocity.
A second cannonball which accelerates all the time is shown for comparison.