Gun barrels steel is a alloy
A tool steel as you said 4140 or 416 stainless
It is not heat treated to hardness but normalized it is already has the charrestics needed to be a gun barrel, but if it was hard it could not be machined or drilled with a gun drill or a rifling button pushed or hammer forged.
The steel is malleable
Here is a article from a random google search
And wiki about Rockwell hardness
It is true that barrels can be hardend, they are made of a tooling steel
But TiG welding can be used to a controlled method by a good welder.