It’s Known that shirk invalidates good deeds. But if a Muslim repented from it will his previous good deeds get restored.
In Shirk and its different forms
Nov 16th, 2019
Yes, in sha Allah as Allah forgives all sins if a person repents sincerely, with deep remorse.