Thank you for lodging that issue. I made a fix in this PR
https://github.com/discourse/discourse/pull/11551
When a user is deleted post describing category is not deleted anymore. Instead, the author of the post is changed from the original user to the system user.