Buraidah (May Allah be pleased with him) reported:
The Messenger of Allah (ﷺ) said, "If anyone swears that in such and such case he will be free from Islam and afterwards he turns out to be a liar, he will be as he has sworn; but if he is speaking the truth, he will not revert safely to Islam."[Abu Dawud]. (JA)
App reference (JA): Book 18, Hadith 200 (JA)
Arabic/English book reference (JA): Book 18, Hadith 1710 (JA)