Was just a quick search with info I once looked up myself. Wasn't aware I could deny click for freedom though.I think closest enemy hero gets attacked before a catapult, no? If closest things to a tower are a creep, hero and catapult, in that order, and the creep dies, the tower will focus on the hero.
I think the catapult does get priority, but i guess I'd have to check it myself.