The point isn't suicidal dragons. The point is that the dragon facing X commoners with longbows either doesn't attack, attacks and does a bit of damage before running away, or it attacks for multiple rounds and dies.
Commoners with longbows should not be able to keep an ancient dragon from attacking their town or force it to flee. And as you say, the dragon won't be suicidal, so a continued attack isn't happening.
Longbow just add a few points of damage and don't change much. If the villagers are in town, then buildings will be in the way. Dragon flies in low, sets buildings on fire. Next time they have cover from the fire and smoke. Maybe they attack at night. That or the dragon just drops burning logs from 300 feet up.
These hypothetical scenarios keep assuming worst-case for the dragon or dragons that use zero tactics. But yes focused fire from a large enough number will be a threat. So an intelligent dragon won't expose themselves to that risk.