If it is a mockery of Allah, the Qur’an, or the Prophet, it is considered infidelity and the one who does it is considered a disbeliever.
(If you question them, they will certainly say, “We were only talking idly and joking around.” Say, “Was it Allah, His revelations, and His Messenger that you ridiculed?” Make no excuses! You have lost faith after your belief. ) Al-Tawbah 9 : 65-66
اذا كان الاستهزاء بالله تعالى أو بالقرآن او بالرسول صلى الله عليه وسلم : فهو كفر مخرج من الملة، وقد دل على هذا قول الله تعالى
( ولئن سألتهم ليقولن إنما كنا نخوض ونلعب، قل أبالله وآياته ورسوله كنتم تستهزئون* لا تعتذروا قد كفرتم بعد إيمانكم)
التوبة 9:65-66.