Cardinals manage territory pretty well. He sees his own reflection on the glass and motors over in an effort to repel the intruder. Whack! bluejays will run into a window doing the same thing.
I had one that took on his "rival" .... every day all spring. About 8 am the light was just right on that particular window to reflect his image ...he'd crash into the glass 10 times or more in an hour.
I'd put something on the glass pane to break up the reflection. See if that helps.
~Hill