that anyone who has read Hogwarts a History will know
that the castle is proected by enchantments.
The proof is provided in the 6th book when Harry and Dumbledore return to the castle upon seeing the DARK MARK.
Harry felt a shudder as his broomstick crossed entered the grounds and he knew that Dumbledore was undoing the enchantments protecting the castle.
Well if all of the above is true how could sirius have escaped on buckbeak (in book 3) when u cannot fly out until the enchantments are removed??