People with BPD traits (pwBPD) are known to be quick to act, react and overreact, too often in negative ways. Naturally, we shouldn't be like that, our inclination is generally to be positive. So "retaliation" as a reaction to receiving negative treatment isn't productive. Usually it's a spur-of-the-moment impulse that doesn't make things all better. That's where a measure of self-control is so helpful.
I just read in another thread about HALT - Hunger, Anger, Loneliness, and Tiredness... if that applies then best to pause (halt) and let yourself ponder what to do to avoid self-destructive responses. (You can do an internet search on HALT.)
While your issue cited here does not seem so much as "acting-out" (harming others) it may fit more as "acting-in" (sabotaging self)? Whichever, it can certainly be frustrating in any relationship. And feeling walked over too is discouraging.
One of our normal inbuilt cravings is reciprocation in our relationships. We give and share while wanting others to similarly give and share. It's upbuilding and overall productive.
When things get unbalanced is when one is always giving and the other always taking, even opposing. Imagine sitting in a rowboat, you rowing toward a wonderful goal but the other is just sitting there, perhaps even rowing in the opposite direction. That eventually becomes frustrating and unworkable. In time you're tempted to give up and give in and what you do becomes, almost before you realize it, appeasing and enabling. Not a success story.
There are many relationship tools, communication skills and time-tested strategies discussed here. Many members have been here for years and our collective wisdom is a result of our "been there, done that" experience.
One skill, one of many, is learning what Boundaries are. Boundaries are not placed on the misbehaving person because typically they resist proper boundaries of behavior. While it isn't intuitive,
Boundaries are for us. How so? Boundaries are how we
respond to poor behavior.
For example, the other person may start ranting, raging, blaming us, making demands, virtually taunting us to respond similarly. However, we can have a clearly stated Boundary that we won't sit by as a willing target. Rather we can decide to exit and go elsewhere such as to the park, to a restaurant or the supermarket, stating we will return. That gives the other time to reset. Will it work? Perhaps not so much at first. Hopefully over time at least part of our boundary will become the normal and accepted policy.