Moodle now allows you to release marks to students while maintaining anonymity.
Previously, staff had to reveal all student identities before releasing grades to ensure students saw both the feedback and the grade/result. This was not ideal especially when some students required longer extensions than the norm.
Moodle has now been updated to “allow partial release of grades while marking anonymously”. This new option can be found in the assignment settings under the “Grade” section. Click the “Show more…” option that is in red at the bottom of this section as shown below:

Then change the dropdown menu to “yes” as shown below (this is not enabled by default):

Now, when releasing grades, you do not need to then “reveal student identities” beforehand. Students will receive both the grade and the feedback if the option to “allow partial release of grades” has been turned on.
Please note: lifting anonymity entirely remains the same and is a one time action.