I'd consider trapping or shooting one somewhere else, then hanging it from a tree. They seem to get the message.
Aluminum pie tins hung from strings tend to keep crows and other pests away from gardens, but I don't know whether it will keep them out of trees.
“God save us from people who mean well.”
― Vikram Seth