Maybe the poor guy hurt himself. I tell visitors that I don’t keep my windows clean so the birds won’t hurt themselves. Good excuse for being lazy I guess, but I have had some birds die that way. Don’t worry, whatever happened is not your fault.
How about hanging strips of something shiny or colorful and decorative outside the window? Many birds die banging against windows.