Oh interesting. I was about to say that's not what banter means, because in my mind I always thought it's just a casual fun back and forth conversation not necessarily skirting that boundary of teasing. But then I checked the definition and teasing is a part of it. Every day you learn something new.
I think of banter as saying something offensive but not really meaning it so the humor is in being "playfully offensive" or "offensive when you don't really mean to be offensive"
This is a shallow analysis. Banter doesnt need to be about a transgression or offensive at all. E.g. if you were talking to Armand Duplantis, you could tease him about how easy he makes breaking the world record look: "Hey Armand, you havent broken the world record in this past year...arent you due?"