If I was a massive flying creature to whom one of the biggest dangers in my life is a high-speed uncontrolled crash landing, the last thing I'd want to do is attack something from the air in near-zero visibility* or darkness, no matter how well I knew the layout in daylight!When it comes to dragons and archers, the "dragon loses" assumes that the dragon is stupid. In my campaign, dragons after a certain age category are not stupid. They'll wait until everything is in their favor, attack at night or even when there's rain or snow. Even races with darkvision the first they're going to know the dragon is coming is when the dragon fear kicks in.
Why on earth would a dragon attack in the middle of the day? They know where the city is. With any kind of reconnaissance they'll know the basic fixed defenses.
* - being unable to recognize a Dragon for what it is at 500' definitely counts as near-zero vilibility; which is usually defined as being unable to discern large things at under 1/4 mile