If an enrolled Student was added before s/he was enrolled to the course as Guest Student, the student will have both roles in the course. This may impede the student from taking part in graded assignments as Guest Students cannot take part in graded assignments.
Go
...
to Courses > Click Course Name
Go
...
to People and Search Student Name
Click the corresponding 3 dots next to the student's name and select User Details
Under Membership, click Delete beside the Enrolled as: Guest Student membership.
Do note, due to inactive enrolments, you may still see the Guest Student role reflected in People.