Hazrat Shaikh Moulana Muhammad Zakariyya (rahmatullahi ‘alaih) once mentioned the following:
As far as the sin of shaving and trimming the beard (less than a fist length) is concerned, then though it is (a major sin, it is) not as severe as the sins of zina and consuming alcohol, etc. However, the difference between the two (shaving the beard and zina) is that when a person commits zina, then for the period of time when he is engaged in the sin of zina, he loses the noor of his imaan. After committing the sin, the noor of his imaan returns.
On the contrary, when a person shaves his beard, then he remains in the state of sin all the time – as he is involved in this sin even when he engages in ‘ibaadah such as performing salaah, fasting, reciting the Quraan Majeed, performing hajj, etc.
Furthermore, perpetrating this sin involves breaking the command of Allah Ta‘ala in an extremely brazen and bold manner. The reason is that the person who shaves his beard comes before people in a manner where he reveals to them openly that he has committed this sin.
(Malfoozaat Shaikhul Hadith pg. 33)
Source: Ihyaauddeen.co.za