The notion that a longer barrel is more inherently accurate comes from the days of iron sights....the longer sight plane was easier to shoot well than a rifle with a short sight plane.
In rifles with scopes, shorter barrels tend to be more forgiving, with wider nodes, have less barrel whip and generally easier to get to shooting really well compared to a longer barrel, especially a light contour.
My 18" Fieldcraft is an honest 1/2" gun. My 20 year old Steyr Scout 19" is a 3/4" gun. My son's American Compact 18" 7-08 is a 3/4" gun... and I've worked with several more carbines that just shot incredibly well with factory ammunition. Short barrels are no detriment to accuracy and a longer barrel is likely harder to get there with.
The hardest rifle to get shooting well was a Weatherby UL...with a 26" thin barrel it was simply a nightmare. Finicky about everything- bullet, powder, primers.
Longer barrels can be accurate, but it generally takes a bit more work to get there as compared to a short barrel in my experience.