This is true if someone’s already being offensive towards you. Sometimes the more defensive you become, the more the other person escalates being offensive.
Now think about how it is if you walk around being defensive. Keeping a chip on your shoulder attracts people who want to knock it off.
Offensiveness and defensiveness are complementary feelings in a social transaction. You cannot have one without the other.
Being defensive will draw offense your way. Being offensive will draw defensive people your way.