To present one other option, if you’re changing the tree to be opt-out in the upcoming update.
It’d be a little more work, but I’d be willing to hit ‘unindex’ whenever a card should no longer show up in global search or in the Link/Parent dialogs.
Alternatively, you could unindex it from the tree when it was archived relative to all of its parents, achieving the same as the above approach whilst making it explicit.