Sounds like possibly three requests:
1. Mark a resource as immutable such that any change causes a replace
2. Mark a resource as to be orphaned on replace rather than deleted (Presumably if you removed the resource from your program it would still do an actual delete? If yes then I think an option something like orphanOnReplace or forgetOnReplace makes sense, if no then "*OnDelete" or "doNotDelete", "undeletable".
3. Allow state delete to prune the targeted resource from the dependency graph. I think for safety you'd want this to be an extra option like --transitive-trim or something.