Here are some hadiths:
Bukhari
Volume 9, Book 89, Number 271:
Narrated Abu Musa:
A man embraced Islam and then reverted back to Judaism. Mu’adh bin Jabal came and saw the man with Abu Musa. Mu’adh asked, “What is wrong with this (man)?” Abu Musa replied, “He embraced Islam and then reverted back to Judaism.” Mu’adh said, "I will not sit down unless you kill him (as it is) the verdict of Allah and His Apostles.
Al-Tirmidhi HadithHadith 3466 Narrated byUthman ibn Affan
AbuUmamah ibn Sahl ibn Hunayf told that when Uthman ibn Affan was besieged he looked down and said: I adjure you by Allah. Are you aware that Allah’s Messenger (peace be upon him) said, “It is not lawful to kill a man who is a Muslim except for one of three reasons: fornication after marriage, or unbelief after accepting Islam, or wrongfully killing someone, for which he may be killed”? “I swear by Allah that I have not committed fornication before or after the coming of Islam, or apostatised since I swore allegiance to Allah’s Messenger (peace be upon him), or killed anyone whom Allah has declared inviolate; so for what reason do you want to kill me?”
Muwatta
Book 36, Number 36.18.15:
Yahya related to me from Malik from Zayd ibn Aslam that the Messenger of Allah, may Allah bless him and grant him peace, said, “If someone changes his deen - strike his neck!”
The meaning of the statement of the Prophet, may Allah bless him and grant him peace, in our opinion and Allah knows best, is that “if someone changes his deen, strike his neck!” refers to those who leave Islam for other than it - like the heretics and their like, about whom it is known. They are killed without being called to tawba because their tawba is not recognised. They were hiding their kufr and publishing their Islam, so I do not think that one calls such people to tawba, and one does not accept their word. As for the one who goes out of Islam to something else and divulges it, one calls him to tawba. If he does not turn in tawba, he is killed. If there are people in that situation, I think that one should call them to Islam and call them to tawba. If they turn in tawba, that is accepted from them. If they do not turn in tawba, they are killed. That does not refer as we see it, and Allah knows best, to those who come out of Judaism to Christianity or from Christianity to Judaism, nor to someone who changes his deen from the various forms of deen except for Islam. Whoever comes out of Islam to other than it and divulges that, that is the one who is referred to, and Allah knows best!
Basically all the accepted hadiths have a law about leaving islam - and it ain’t a farewell card.