I did ask the question (that was raised on a live stream) regarding replacement of Engineered modules at the rebuy screen.... Presumably the insurance company has unlimited access to the materials required and can afford to engage the relevant Engineer's time until each module / weapon is created again....
.... the answer was, of course, that we would retain the modifications - I suspect to prevent a revolt from those who would not want to spend the time re-gaining them (but at least they would have expended the effort getting them in the first place).
You know, losing modifications and stock gear could work very well if the upgrades were
a) Cheap
b) Not straight unmitigated and especially not so huge upgrades.
If it were more like "I can alter the thrust vectoring capabilities of your ship, you will be able to turn 10% faster but lose 10% of your speed, I need 2 units of iron and one of <insert very common material>.
But with the way the engineer upgrades work right now, losing them would be like your A grade Anaconda were replaced with E grade, both in terms of the effort that went into obtaining the stuff, and in the loss of capabilities in all aspects.