Your kids are doing the best they can.
When we tease them for struggling it puts a wound in their self concept and in our relationship with them.
Even if we are truly joking because it's socially acceptable and maybe our parents did it with us, it's truly risky because we don't know how it will land. There are lots of other things to be funny about that don't hold the potential to be emotionally abusive.
I see parents do this thinking it's harmless. Unfortunately it can be deeply hurtful to say that your child will one day see how awful they were by having a child as awful as them.
Parenting is hard sometimes, but our kids don't need to feel guilty about that.
If you've already done this, own it and apologize...we all make mistakes, then when we know better, we do better. Just like we are asking our children.