It is not permissible to mock the one who leaves his beard, since he leaves it (due to) carrying out the order of the Messenger of Allaah (sal Allaahu alaiyhi wa sallam).
It is befitting that the one who mocks should be advised and attempts made to guide him and explain to him that his mocking the person who leaves his beard is a tremendous sin. Apostasy from Islaam is to be feared for the person who commits this (sin) – in accordance with His Statement, the Perfect and the Most High:
Say: was it Allaah and His Ayaat that you were mocking? Make no excuse; you have disbelieved after your eemaan. Surah At Tawbah (9) ayah 65 and 66
And with Allaah is the tawfeeq. And may peace and blessings be upon our Prophet, Muhammad and upon his family and Companions.