As teacher, create a quiz and set a time limit and set When time expires to "There is a grace period when open attempts can be submitted, but no more questions answered". DO NOT set an end date. Set Submission grace period to a suitable amount of time to let you do the tests below.
1. As student, start a quiz attempt and answer some questions. Then leave the browser tab open until time expires.
2. You will be automatically redirected to the review page, and the quiz will move into the overdue state.
3. Do nothing while waiting for the grace period to be over. Then go to the summary page of the quiz, and your attempt will be "Never submitted".
4. Login as teacher and check that that the attempt is set to "Never submitted" and has not been graded.