HWPs are weird in many regards; long story short, you can't separate the weapon from the chassis.
I suppose you want to have an interchangeable weapon on a given chassis. The simplest way to do so would be to make a manufacturing project which requires tank with weapon X as well as weapon Y, and the result is tank with weapon Y and an item for the weapon X.