If you unenroll students from courses, they will not have access to their data. As you have noticed it is still there- you will need to reenroll them and select the setting to restore grades.
Enrolment
enrollment synchronization
This discussion has been locked so you can no longer reply to it.