"And if any of you were to apostatize and then die in apostasy, his deeds would come to naught in this life and in the Hereafter; these are the losers. (20)"

يَا أَيُّهَا الَّذينَ آمَنُوا لَاتَكُونُوا كَالَّذينَ كَفَرُوا وَقَالُوا لِإِخْوَانِهِمُ الَّذينَ كَفَرُوا لَوْ أَنَّهُم كَانُوا عِندَنا مَا مَاتُوا مَوتَةَ وَاحِدَةٍ وَلَكِن يَأتِيَ اللَّهُ بِأَمرٍ كَانَ مَفْعُولاً وَإِنَّ اللَّهَ لَعَزيزٌ حَكيمٌ

In this verse, Allah warns those who have faith but are wavering, that if they were to revert to disbelief, their entire lives' work would be rendered useless. Their good deeds would not benefit them, and they would be losers in both this life and the next.