First of all, including a screenshot in which the relevant slots are cut off is peak comedy. Secondly, just repackage the ship and reassemble it. We can plainly see that it is not currently rigged, and even if it were, rigs aren’t destroyed when they’re removed from T3Cs.
If you alter the subsystems then the gun can end up occupying a slot that no longer exists. Though I can’t say I’ve ever had that make the gun ‘un-removable’.
It appears a message that says, whatever you try to do will not work, the ship is not in the same location… I also tried with a mobile fit in space, same behaviour.
All modules goes off but that one overloaded don’t move one inch… it’s glued in…