Okay other than the "I walk around in robes carrying a mage staff" which is just such a glaring hole, so much that it should just be ignored. Its just a RPG game flaw that says "Mages wear Robes." If Hawke's armor had face coverings etc, to hide his identity while he casted his magic, it would made ALOT more sense.
Act 1. Hawke's generally a Nobody. Hes got a minor name with the Smugglers/ Mercenaries, but other than that he might start getting noticed for Templar to pay attention, but then he disappears down to the Deep Roads, only to return with a crap load of wealth. Giving him enough money to make the right people make evidence disappear. On top of that Hawke is relatively inactive for 3 years, probably getting rid of the I'm A MAGE attention he earned pre-deep-roads.
The only Templars who directly learn you are a Mage, is Cullen whom you technically save his life from the demon. And Thrask, who is willing to turn a blind eye to help mages out.
By Act 2. Hawke has enough money, gaining the attention of the Vicount, and is known by name by the Arishock. The Qunarri are the biggest threat at this time, and its getting worse by the moment. Not to mention the number of apostates running around, probably keeps the Templar busy than trying to take down a Mage who has some level of privilege. Its most likely the Arishock that really keeps Hawke out of Templar hands. The Vicount uses Hawks reputation with him to help attempt to calm his down.
Act 3 - Your the Hero and Meridith is having a hard enough time keeping Orisino alive. The simply fact that putting Hawke in the Gallows would give the Circle more political clout. Keeping Hawke at arms reach, with veiled threats. The moment her other mage problem is "dealt" with, and Orisino gone, she finally can turn on Hawke which she does in a heart beat.
Overall there are moment in the game where Mage Hawke plot wise is incredibly weak. But the over arching story of Hawke being the one who could help stop the Mage rebellions, Mage Hawke makes alot more sense. (How would a Warrior Hawke who sided with the Templar have ANY influence on rebelling Mages, where a Mage Hawke regardless of who they side with would have a lot better of a perspective)
Over all Kirkwall has more apostate than rats it seems.