Centerfire rifle barrels are bent upward by their attachment to the action during recoil. This initial displacement is not quite what I mean by a "vibration." It is the externally forced initial distortion which causes subsequent standing wave vibrations after that external force ceases. Just semantics, I guess. The attached rifle barrel "knows" its mechanical vibration modes even when they have not yet been excited. This recoil-induced transverse vertical distortion of the barrel does assume the general shape of one of the modes of subsequent transverse shear-wave vibrations (but not exactly that shape). There are many other types of shear-wave vibrations, as well as higher-speed acoustic vibration modes, all of which occur simultaneously and additively.
We always shoot "ladders" during load development as formalized by Creighton Audette in articles written for Precision Shooting Magazine about 20 or 30 years ago. You vary the barrel dwell time and hence the instant of bullet exit from the muzzle via incremental variation of powder charges. Our wind-free indoor 105-yard range removes some of the confounding variables encountered outdoors. The powder charge where successive shots group together at 105 yards identifies the bullet exit time when the muzzle is vertically stationary relative to the fixed earth below it. Any subsequent barrel shortening or rigidly attaching any mass to the muzzle will change this desirable exit time. Any change in the load or bullet seating will also change the barrel dwell time and thus the bullet exit time.
Due to longer barrel dwell times, rimfire rifles generally do start freely vibrating before bullet exit. The long, slender barrel of the old MkIII SMLE was also perhaps an example of this due to its very low base pressure at bullet exit. Distortion amplitudes are greater for the more flexible slender rifle barrels. Fundamental mode frequencies are also lower for more flexible barrels. Modern, heavy barrelled, high velocity rifles can only typically use that first instance when the downward bending speed of the muzzle matches (and cancels) its upward recoil motions. The chamber pressure curve for a modern shoulder-fired rifle looks like the first half-cycle of an 800 microsecond driving cycle, indicating a peak in the vibration driving spectrum at about 1250 hertz. Energy transfer to the barrel in Mode 2 (single node) transverse vibration can be minimized by shifting its Mode 2 resonant frequency well away from this dominant driving frequency.