When an account is deleted, the username in the user's posts and comments is changed to a generic
user<userID>. But the username stays the same on close and delete notifications on posts the user had voted to close / delete1. I think it shouldn't, especially for users who used their real name as their username, if they chose to distance themselves from the site and remove their accounts, it makes sense that they wouldn't really want their name plastered on close and delete notifications.
A perhaps easy way to avoid the actual username remaining visible would be to change it to the generic
user<userID> (or anything generic enough, like "anonymous") prior to deletion, and wait a bit for the generic username to propagate all over the site. If I'm not horribly misreading this answer, this was part of the process in the old days.
This could be automated or added as a suggestion to the account deletion help page.
Glaring example can be seen here, where the deleted user also posted a comment where their name is properly anonymized:
1 I've seen it on close notifications and self deleted answers. I'm not sure it happens on deleted questions, or deleted answers that aren't self deletions, and I don't have a way to verify it - other than stumbling on them accidentally