Hilchos Lashon Hara chapter 4, section 1
It is forbidden to say anything that would humiliate another Jew even if it is not spoken in his presence. And it is forbidden to demean him even if he saw him behaving improperly in his relationship with G-d. Although this friend didn't behave properly towards G-d.
Hilchos Lashon Hara chapter 4, section 2
It makes no difference if the offense is a Torah imposed Lav or Torah imposed Aseh that is commonly known in Jewish society to be forbidden, because most certainly the
"victim" would be deeply humiliated by anyone who heard this story. Even if the incident is something that many Jews are not careful to observe, for example, saying that this person doesn't want to learn Torah. Nevertheless, disclosing the incident is forbidden because ultimately, this person is someone who doesn't fulfill the mitzvot of the Torah.