Essay qustions cannot use 'immediate feedback' because Moodle cannot grade the response. Therefore, whatever behaviour you select in the quiz settings, essay questions will use 'manual graded' behaviour (which is not an option in the UI, but exists behind the scenes.)
Here is another example of the kind of thing that can be done
So, the correct way to implement what you are trying to do is to make a new behaviour "manualgraded_with_check". Then, change the make_behaviour method in the essay question type to use that behaviour, instead of manualgraded, when the preferred behaviour is one like immediate feedback.
(Probably the best way to determine "when the preferred behaviour is one like immediate feedback" is to call question_engine::can_questions_finish_during_the_attempt($preferredbehaviour).)