Extending a barrel would flat-out increase muzzle velocity and damage, that’s like second-course chemistry/dynamics tier calculations (integrate over the pressure*area of the expanding gas as a function)
What would be interesting is if firearms had fall-off damage, to simulate air resistance and whatnot (I presume they do but more for balance reasons). On an SMG or something, the extended barrel would do more damage, but since air resistance is proportional to speed, it wouldn’t be so effective at longer ranges. Ultimately it would increase closer-range damage, and basically extend maximum useful range, but you should be doing like only the previous longest-range damage, and not the previous max + some bonus at far, but up close it could be disastrously more effective.
Maybe the extended barrel could be unthreaded, so it increases damage but reduces accuracy as a trade-off.
The recoil would be increased, if only slightly, as the increased mass wouldn’t overcome the increased force on the bullet. (i.e. 5% more mass vs 25% more bullet force).