To prevent it, you would need to make sure that before a user is deleted or a login is deleted the SIS ID is removed. We do this with our blueprint courses since we manually set these and sometimes delete them to replace them with a new version.
This is still prone to user error/oversight, but being aware of this and building into any processes that result in user and/or login deletions will help reduce the likelihood of the issue in the future. You might be able to do a theme modification to hide the delete options when a user has an SIS ID, but that wouldn't prevent deletes by API (if the user has permission) or SIS Import.
If anyone else has any suggestions for how they handle it differently, I would be interested in knowing too.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.