Your guardian angel still has a job to do even if you’re in mortal sin - for one to lead you back into a state of grace through repentance. One of the saints who was very close to her guardian angel reportedly felt the angel slap her cheek when she sinned (can’t remember which saint, I’m afraid).
I imagine even when I’m in mortal sin my angel is pleading for me the whole time before the throne of God to obtain for me the grace of repentance.
And just because God doesn’t force us to be with Him doesn’t mean He doesn’t still give us good things - life, health, strength, love, success - even when we’re in a state of mortal sin.
The help and protection of our guardian angel is just one of those good things, and God won’t take it back.