Yep: Short 18-22” barrels with large diameter (1.25” or even 1.35”) can be incredibly stiff and shoot tiny groups - if it was properly chambered and bedded to the stock. What you lose in speed and therefore higher dispersion due to wind drift can be recovered (regained) over the shorter distances by better inherent rifle accuracy. Run a Litz WEZ analysis, and you can determine at what distance the quadratic wind drift effect overwhelms the linear MOA benefit. [Wind drift is proportional to distance squared. Angle error resulting from inherent rifle accuracy (say the gun is consistently capable of 0.15 MOA at 100) scales with distance (raised to the power 1), so a linear effect. Wind dominates at long range.]
A rail gun meant for 600 yard BR heavy gun competition that shoots in the ones and zeroes (<0.199” group size) will often have rediculously large barrel diameter, and weight, and you never see a rail gun with a 36” barrel. On the other hand, an ELR rifle meant for 2,500 to 3,500 yard competition will often use 32-36” barrels, but they will not typically shoot 0.1” groups with monos. As always, there are trade-offs.
Example: I have a 30” 6.5 mm bull barrel (1.0” diameter) made by a top barrel maker, and at 100 it shoots at best 0.5-0.7” groups, but at 600-1000 yards it performs really well on 1 MOA steel targets, using high BC bullets and specialized powders. [BTW: The top speed powders listed in the Hornady load manual (developed via testing on 24” barrels) were not ideal for the 30” barrel. Look at the powders listed for a bullet weight 10-15 gn heavier. ]. My 26” barrels outperform the 30” barrels out to 500, maybe even 600, but after 800 yards the rifle with the long barrel seems to win.
And only some actions and stocks are made to handle such long heavy barrels, which is why some gunsmiths will use a barrel block setup with the action “free floated”. Not common, but you occasionally see one at King of Two Miles.