Thank you Tim for your advice!
We fixed the issue with your instructions.
Now the feedback given in the assessment book does not appear at all in the quiz. The ideal situation would be that the comments/feedback would show up in both places when the Review options of the quiz are displayed.
And we did a bug report, "Feedback comments from gradebook always visible in the quiz":
https://tracker.moodle.org/browse/MDL-81177
Tracker-koulutus