You need to assertively and calmly pull her up every time she makes such a comment.
If you try and be joky or smart she can turn that back on you or simply see that as a cue to ramp things up.
“That comment was rude and unkind. Please don’t make any such comments again”
“That comment was offensive and unnecessary and clearly meant to be so. Don’t make comments like that”
Don’t lose the temper or cry in front of her, I KNOW that’s hard but it will play right into her hands.
Be prepared and determined in your own mind to walk away from her too, and saying WHY you’re walking away.
“I won’t listen to such comments”
“I don’t deserve those comments and I won’t stay to listen to them”
Also you really need to have a word with dh.
He should have your back ESPECIALLY now.
Sit him down and say to him that if he’s any kind of decent husband and father he will have your back, he will stand up for you at this vulnerable time, and he will make it clear to his mother that such comments won’t be tolerated by either of you.
Quite honestly (and I may get flamed for this) he needs to be more wary of upsetting you than upsetting her!
I haven’t had a mil like this but I have had people in my life like this. Where possible I take nothing more to do with them but where that’s not possible I have learned over the years that the above approach is best and most effective.
My mum did have such a mil (lovely gran, nightmare mil) things came to a head at one point and my mum, THE most mild mannered person EVER took my dad to task who then spoke to gran. Things improved but I don’t think they were necessarily “easy” though strangely when gran got older and started to need more care mum was one of the few people she really trusted and wanted to help her. Funny how things turn out, and they actually grew quite close.