All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is established in the methodology of Ahlus-Sunnah that a person does not go out of the fold of Islam by committing a sin until he considers it lawful.
Just committing a sin, or committing it openly, or even boasting about it while believing that it is forbidden and that one deserves punishment for doing it, is not regarded as making it lawful; the matter which renders a person out of the fold of Islam.
However, the person who commits such a sin is upon a grave danger, and his act reflects that he is severely hard-hearted, we seek refuge in Allah from this.
Allah knows best.