One thing I'd note about bounded accuracy is that HoDQ doesn't actually carry it through. Notably with the dragon attack. Unless it's utterly immune to non-magical weapons (in which case the PCs are near-irrelevant, which they aren't) by-the-book Bounded Accuracy would lead to a big flappy winged pincushion knocked out of the sky by guards with bows.
Does handling the dragon by fiat-ing away Bounded Accuracy make for a more interesting adventure? Yes. Does bounded accuracy deliver as promised? IMO yes - which is why to make for a more interesting adventure HotDQ had to get rid of it.
The dragon is given a clear set of conditions under which to run. Given the HP of the dragon, getting the extra 200 damage isn't something that ≤6 PCs are going to do before he's out of range. Keep in mind... Fly 80.
Take a bow specialist fighter: With a +7 to hit (bow specialist +2, Dex +3, PB +2) vs that 19, that's an 8/20 chance of hit - at short range...
At long range, 64/400, or 2/25.
With fly 80, said dragon flys 40 in, zaps, then flies 40 back... and so only prepared actions get to shoot at short range.
But the men on the walls are not bow specialists. They don't even appear to be fighters. They're probably only +3 with bows, and firing at long range, so 1/25 at long. and there are only 20 of them. Assuming they're even proficient. If not, at long range, it's a 1/100 chance...
Once he decides to flee, its 160'/round. 3 rounds, and he's gone!