From which community do you want to be removed? If you are the owner/top-mod you have to transfer the community to another mod first. And if you're the only mod you'll have to get another one first. Communities can not be left without a moderator.
There is a bug with specific userID being removed when clicking leave mod team instead of an actual user. There is a fix, but it wasn’t released yet as far as I know.