It is hard to come to a conclusion without knowing more both about the punishment, and the behaviour being punished.
If the punishment involves depriving the children of some joint activity, then it's a little more understandable that A would be included in the deprivation. Allowing only A to do it while excluding B would make B's punishment worse, and perhaps have a negative impact on the relationship between A and B.
If it involves refusing to pay for something (presumably some extracurricular activity) that the two are both doing but not jointly, then it indeed seems unfair to A to deprive both of them of it.
It also depends very much on the nature of the offense, and, in particular, whether B was deliberately making fun of the grandfather, or was just repeating jokes that she'd heard, without much thought. And in the latter case, how obviously related to the grandfather's situation it was - to what extent could B have been expected to know that the grandfather might be sensitive about it?
It might serve as a lesson to B to 'think before you open your mouth', and that if you don't, you may not only get yourself into trouble, but others as well. However, it also sounds as though the grandfather is a bit overly status-conscious; and may be not only offended by the particular jokes, but invested in 'showing who's boss'.
Obviously, there isn't anything the OP can do about it, and it may be necessary to tread carefully, especially if as sounds possible, different cultural backgrounds are involved. And lockdown is likely to be making all family misunderstandings worse. I hope things are eventually sorted out!