The masking metamagic "hides" an awakened aura on the astral plane. (It doesn't make the aura invisible, it still shows up, but as a mundane aura)
Improved Masking hides your aura AND any sustained spells attached to your aura. In the case of your invisible gun, it would hide it the spell aura as long as it was close to your body (as per aura extension through armor) but the moment it left your control, it would be visible on the astral again.