If a Muslim committed Ridda and later repented, what would happen to his rewards he got for his good deeds before he committed the Ridda?
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.
If someone apostates from Islam –we seek refuge in Allah from that –and then he repents and re-embraces Islam, then there is a difference of opinion whether or not the good deeds which he did before his apostasy become invalidated.
The majority of the scholars are of the view that the reward for his deeds becomes void, while some of them are of the view that the reward for the good deeds he did before his apostasy do not become invalidated as long as he dies as a Muslim.
Shaykh Ibn 'Uthaymeen said in his radio program [Liqaa’ Al-Baab Al-Maftooh]:
"If a person repents from his disbelief, whether his disbelief was due to abandoning the prayer, making fun of the religion of Allah, insulting Allah, insulting His Prophet or insulting one of the rituals of Allah, then his previous deeds are forgiven as Allah Says (what means): {Say to those who have disbelieved [that] if they cease, what has previously occurred will be forgiven for them..} [Quran 8:38] This is because apostasy invalidates the previous good deeds and repentance invalidates the previous bad deeds, as Allah Says (what means): {Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful."} [Quran 39:53] Allah also Says (what means): {And those who do not invoke with Allah another deity or kill the soul which Allah has forbidden [to be killed], except by right, and do not commit unlawful sexual intercourse. And whoever should do that will meet a penalty. Multiplied for him is the punishment on the Day of Resurrection, and he will abide therein humiliated - Except for those who repent, believe and do righteous work. For them Allah will replace their evil deeds with good. And ever is Allah Forgiving and Merciful.} [Quran 25: 68-70]
If he repents, then Allah forgives his previous sins and he regains the reward for all the previous good deeds he had performed before his apostasy, because Allah conditioned the invalidation of the deeds of the one who apostates on him dying as an apostate, as Allah Says (what means): {And whoever of you reverts from his religion [to disbelief] and dies while he is a disbeliever - for those, their deeds have become worthless in this world and the Hereafter, and those are the companions of the Fire, they will abide therein eternally.} [Quran 2:217]
Rather, the good deeds he performed during his apostasy will be written for him, as the Prophet said: 'You accepted Islam and you will get the reward of all the previous virtues that you had practiced before.'" [End of quote]
Allah knows best.
You can search for fatwa through many choices