Haven't you seen bird deterrents sold at hardware stores?
Check out these articles, same principle:
How Flashing Lights on Cell Towers Can Save Birds’ Lives | Audubon
12 Best Bird Deterrents That Actually Work (2022) - World Birds