I, of course, do not know exactly what you are doing. But let's say the minimum passing grade is 60%. A student takes the quiz, and gets a 62%, and you want to not allow this student to try again. But another student gets a 58%, and is allowed to try again. On the second try, this student gets 95%. Is it really fair to allow the poorer student to try again, and on the second attempt to far surpass a student who "passed" this quiz on their first attempt?
As another idea, why not convert the essay questions into a different format, such as true/false or multiple choice? I don't know your topic, but I wonder why a student does not get an essay question correct? If you were to convert to multiple choice, then you could have Moodle grade the quiz, allow "repeats," and decide upon some overall grading criteria, such as average of attempts, highest grade, etc.