Assalam Alaykum Ustadh I have understood from someone saying that If for example someone makes sujud to a statue but with pure desire knowing it is haram, and that is a sin, (e.g., for joking), he goes out of Islam due to the act. Is that true? The person has khawarij characteristics.

Ustadh AbdulAziz al-Haqqan
Imam Ibn Bāz said: Prostration to an idol is major disbelief — whether it is to an idol, to the occupant of a grave, to a ruler, or to any individual, so-and-so. Prostration to other than Allah is major disbelief. Allah says: “So prostrate to Allah and worship Him.” Question: Someone says: “But Shaykh, doesn’t it require holding a belief (of divinity)?” Answer: No, no. The moment a person prostrates to other than Allah, he has committed disbelief. Question: Was this compared to the prostration of Muʿādh to the Messenger ﷺ? Answer: No, no. The prostration of Muʿādh — the Prophet ﷺ drew his attention, telling him that no one should prostrate to anyone. And he said: “If I were to command anyone to prostrate to another, I would have commanded a wife to prostrate to her husband.” As for the prostration of the brothers of Yūsuf, that was in a previous law, a prostration of greeting. And the prostration of the angels to Ādam was a prostration of honor and greeting — that was specific to them. But in our Sharīʿah there is no prostration to anyone besides Allah. “So prostrate to Allah and worship Him.”