And - if you did that - you just committed a Federal Felony converting your pistol into a Short Barreled Rifle, thanks to the 1934 NFA.
So don’t do that.
There are a hand full of guns classified as Curios and Relics like the Luger Artillery model which I believe is immune to this. Theis Luger had a longer barrel and allowed you to attache the holster to the back as a stock. It also has a weird rotary magazine option that held a lot more ammo (I want to say 50 rnds, but don’t quote me.)