The whole " a longer barrel is more accurate" statement got started along time ago when a longer barrel was more accurate or a better way to say it is a longer barrel made it easier for the shooter to shoot more accurately. Along time ago it was true a longer barrel general could be shot more accurately because they used iron sights back then not scopes. The longer sight radius on the longer barrel makes it easier to have a good alignment and easier to consistently get that good alignment.
Today with scopes and red dots you dont have the issues of trying to consistently line up iron sights. A longer barrel will not be more inherently accurate than a shorter one.