It seems like Lemmy will delete all your data once you deleted your account. It sounds to me like Lemmy will remove all the post and comments as well.
However, I think some of the posts and comments might be helpful for others, all I want from deleting account is to remove my username, so that others cannot piece together my comments and posts.
Is there a “deactivate” option like reddit where it only remove your username from the post, but not the post?
Don’t count on deleting/modifying to work at all with federation. The data is send to and stored on other servers in the federation. (In fact, Lemmy by default only soft-deletes, so any server admin can recover deleted information from the database.)