The ban is more complicated than that.  What it really "bans" is ties with the Moscow Patriarchate, which has been used by the FSB as a propoganda tool, and is propogating the idea that Russia is fighting a "holy war".

That doesn't make religious suppression OK, just complicated