Similarly to when a teacher can't locate a student on the marksheet, you may find that a student who is no longer in the class appears on an assessment marksheet. This happens when the student was enrolled in the class at any point during the assessment period you are marking.
When using pages like Students > Assessments > Summative Tracking > Mark Entry > Marksheet, the date will auto-fill to the last day of that assessment period and if they were in the class before this date, they will appear on the marksheet.
In the below screenshot, the date range is set to the entire summer term and the student was unenrolled on the 31st May so they will appear on the marksheet.
If you change the date to a date after the 30th May they will no long appear on the marksheet as shown below.