From Lemmy documentation:
We don’t delete anything from our database, just hide it from users. Deleted or removed Communities/Posts/Comments have a “restore” button.
But don’t take my word for it. Try it out yourself. You can make a comment, delete the comment (your username appears to remain) and then restore its content.
This is true, but there are two exceptions: admins have a purge action which permanently deletes content. And like others already said, when you delete your account everything that you posted is permanently deleted.
I could see it being an issue if a user gets permabanned from an instance and wants to delete their content, since they won’t be able to access their account to purge it themself.