Kindly refer to the following link(s):
If an apostate returns back to Islam, will his good deeds be restored?
Also see: People coming on Day Of Judgement with Mountains of Good Deeds but Allah will turn them into dust
Will Allah punish a person twice for his sins, in dunya & also on day of judgement?
Must every sinful muslim be punished on day of judgement before entering paradise?