How do you assumed you recruiting the same lost attached unit. It is not the same one, once attached unit lost, you are bringing new attached unit in the same slot. The same way when unattached unit which got lost, it will be gained from event building or Alcatraz again. Why to stress it like, it is not the same unit which got lost earlier. Why you care so much. If the unit is lost, either military building or event building produce units and additional help of Alcatraz too, what you trying to achieve there. Are you worried about coins spend to produce the attached units. If that's case, having Alcatraz GB levelling and placing military building without unlocking any slot is enough. No coins wasted and units will be added with frequent collection.
Seriously, giving specific attention to attached unit like which you mentioned is surprising me lot. All these years playing, didn't thought to give any attention to the units like that and didn't needed also. Your wish and your play style, I don't want to comment anything on it, but for me it is just unnecessary.