A falling drop of rain creates a tiny pressure wave ahead, below the raindrop.
This wave pushes the fly, gnat, wasp, bee, or insect sideways and the drop misses it.
Fly swatters are made from mesh or have holes on their surface to reduce this pressure wave, otherwise flies would escape most swats.
The insect world is not like our own, and quite different if you really think about it.
Because of the difference in scale, we can regard a collision between a raindrop and a gnat as similar to that between a car moving at the same speed as the raindrop, speed does not scale, and a person having only one thousandth the usual density, for example, that of a thin rubber balloon of the same size and shape.
A balloon is easily bounced out of the way, and would burst only if it was crushed up against a wall.