There has been an annoying belief, both in religious circles, and in communist ones, that being a communist makes you an atheist, or that believing in the ideologies of communism is mutually exclusive to being religious. This is simply untrue and a fault of past socialist and communist nations. However, they do not represent the full ideology of communism itself, and self-criticality is a major part of many left-wing movements, where the nuance to accept the good things about communist nations (lifting people out of poverty, free subsidized healthcare, etc.) is accepted along with the denouncement of their flaws (in this case attack on public religion).
Edit: This was taken from my reddit account, u/Planet_Explorer. We're looking for new members of r/IslamicSocialism101, so you're welcome to join!