This is not uncommon. On several occasions I have collected sparrowhawks for a wildlife rescue centre which have crashed into windows or patio doors. People, quite understandably, tend to locate their bird feeders where they can watch them and unwittingly provide a very tempting takeaway. A black silhouette of a large bird placed inside the window will usually deter the kamikaze.
If you stand in the garden (at various times of the day) and look at the window or patio door - you can see if there are reflections of trees & bushes - if there are then this is just what the bird sees and tries to fly through.