in Moodle 3.7 the setting assign | hidegrader (Hide grader identity from students) was introduced, which works also for the option "Feedback comments".
If a submission is uploaded there's another comment box on the page (assignsubmission_comments). This comment box genereally is independent from the "Feedback comments" option.
However, if a teacher enabled the "assign | hidegrader" option, it's not obvious for that teacher that comments in this box won't be anonymized and that the student will see the identity of the commenter.
So, we would like to propose this UX improvement:
If the setting "assign | hidegrader" is enabled, add a hint to the assignsubmission comments box that says that comments here won't be anonymized.
Here's a little mockup how this could look like (just for an initial proposal):