When a course a course with an assessment module is reset the assessment module does not reset attempts

Assessment attempts are retained when course or module results are reset; this is expected behaviour. Unlock the assessment for the learner and grant additional attempts or allow redoing only incorrect questions to let them retake the quiz. Questions this answers: Why doesn't resetting a course reset the learner's assessment attempts? How do I let a learner retake a locked assessment?