you can use GlobalRule in Source Mapping of that attribute in ObjectConfig of Identity. So in this case, 2 attribute Source, 1 - Data from WD or AD as example 2- global Rule that will return previous value if source is null or link deleted.
Rule Logic should be like below
return identity.getAttribute(attributeDefinition.getName()); this will maintain the old value
Let me know if that works.