3 dimensional movement changes defensive design. As does gravity. Castles rarely have open tops for a reason too. And a dwarf hold is just as susceptible to attack as any other location in a 3D world. It's all a matter of movement type. Flying occurs through gaseous elements and is often thought of as the most common form of 3D movement. Actually, I think swimming through liquid elements is the most common and certainly a consideration in terms of fortification when in an aquatic environment. Tunneling and earthgliding are less common and often more difficult forms of movement and are usually not as often considered in defensive design. That dwarves and dwarf holds would design for such attacks makes sense.
All of this overlooks a 4th kind of movement as sort of brought up at the end of your post: extra-dimensional. Teleporting into the throne room of a castle is just as weak a defense as leaving the front gate open or having no walls. The enemy can potentially come to you anywhere.
My way of handling this is by rating each resource and defense against them upon a power scale. I use 1-10 which corresponds to the levels available in the world for almost everything: monsters, PCs, traps, spells, powers, magic items, and territory just to name a few.
There are forms of defense against all of these attacks in D&D, if you just look back at its' design. (Entering a territory/terrain is just as much an attack/invasion as any other kind of encroachment on others' resources). For me, when setting up combats I set equal forces against each other and let the PCs be the unaccounted for variable.