I really do think there is a tipping point where the level of fantasy makes the traditional castle pretty obsolete.
I'm not so sure that the level of magic is the issue. I think the key questions are economic.
1) Supposing you have a fantasy army and a million gold peices to make a castle. What peice of equipment you buy instead of the castle that would serve your army/nation better?
2) Even if you don't build a castle, you still might need need to house and shelter your fantasy army. Does spending some incremental additional cost of fortifying the barracks, stables, and so forth where you shelter your army justify itself?
3) Can you buy high level characters? That is, with sufficient economic expenditure, can you create high level characters from low level characters through some sort of training program, and if so, what does it cost? It may well be true that a castle is of less value than an 18th level wizard, but if 18th level wizards aren't on the market, you may still end up buying the castle.
4) Is the supply of fantastic creatures effectively elastic, such that it increases with demand, or is the supply of fantastic creatures basically fixed and spending more money to obtain them has a greatly diminishing return. If that is the case, then even if you'd rather have dragons or giants in your employ, you still might buy castles instead.
5) Is the upkeep, directly and indirectly, of magic items, fantastic creatures, and high level characters less than or greater than the upkeep of castles? Castles never create plagues, seek to overthrow you, summon up horrors from beyond, or decide to eat your subjects. Generally speaking, do your subjects feel safer and more contented with your rule if you build castles, than if you employ dragons, giants, or vampires or whatever?