Welcome to the Forum!
When you file down BOTH the front & rear sight,, you are not correcting the problem.
Red dots,, when zeroed properly, do not have to be "in the center of the optical view" or such. You adjust the dot to the group.
(I had that problem long ago when I got my first red dot,, thinking the dot had to be centered in the view.)
Filing sights is a step that "once metal is removed, it can't be replaced," method. The correct way to figure out how to work on adjusting the sights, is to remember; "Take the rear sight in the direction you wish the bullet to go. or the front sight in the opposite direction you want the bullet to go.
I would have started shooting with the rear adjustable sight in the "middle of the adjustment" and fired a group. Then worked on adjusting the rear sight accordingly. IF, once you run out of elevation adjustment, you were still high, THEN maybe start filing.
Not knowing your load, your range, your method of shooting, your type of grip, etc,, it's not quite as easy to determine why you are getting high groups if you went both directions with the file. Your gun may now need a new front sight, and a new rear sight blade. (If the gun is a stainless Super,, then the front blade is an easy fix.)
Did you have a known good shooter try your gun, with your loads, at your preferred range?
But to answer your question,, barrels are not the normal reason a gun shoots one way or the other. So, no, it's not the barrel.