You should have an option in settings to recover all grades by default on reenrollment. The data should still be there and should return when they reenroll. In permissions for the student role, you could remove the self unenrolment permission.
Gradebook
Side effects to gradebook when unenrolling a student
This discussion has been locked so you can no longer reply to it.