Traps and Prevention Methods
If the dragon never enters the dungeon, it cannot threaten the treasure within, right? There are multiple ways to accomplish this:
Yes, I know, in Indiana Jones and Legend of Zelda, people break into, loot, and vandalize sacred ruins all the time, but if the dragons are the only ones there, considering the long lifespan of dragons, they aren't going to do that.
Number one, they may have helped build the ruins, or at least have some sentimental connection to it as a former fixture of their community. Number two, if nothing else, dragons should be much more respectful of the past, especially since those to whom Number one applies will take offense at temple raiders and hunt them down with crossbows.
2.0: Strategic Content
Simply put, if adventurous dragons easily get in and find nothing they want, they'll return and tell others not to waste their time. The genius of this is that there could be valuables inside, but the stinky red herring effectively stopped them and lessened the threat in one blow.
3.0: Little Space
Dragons can take a little discomfort (they sleep on treasure, after all, you think that's comfy? No, but it really impresses potential mates!) but they can't take one thing: little space. There's a reason dragons like to live in big caves! They're like kids with ADHD, they need to move, but instead of running, they prefer to fly.
Narrow corridors and tight turns don't just prevent flight, they drive dragons nuts so only the most disciplined can possibly pose a threat to the dungeon's treasure.
This has been pretty well covered by other answers, but I want to add some ideas, namely:
Yes, dragons are tough, they are fast, they are smart, but the OP makes it clear these dragons aren't top of the food chain. Elves, goblins, orcs, trolls, and even pixies can pose a danger to them. If they live in the ruins and have laid claim to the treasure, they'll defend it, chanting "Protect this temple! Protect this temple!"
Never mind the danger of something that isn't a monster and yet is just as dangerous: ordinary human women! From the fact that Western dragons love to eat them and Eastern dragons can be calmed down by them, never mind the tales of shapeshifting dragons having kids with them, we can safely assume women have a lot of power over dragons.
Thus, a sensitive dollface with big eyes could be an ideal guardian for any dungeon's treasure. "But wait," you say. "Wouldn't most dragons just eat her?" Au contrare, the dungeon designers would have accounted for that!
Perhaps the dollface's beauty is such that a dragon cannot harm her, mentally or physically, or her charm and beauty is such that any dragon that sees her is automatically bewitched and will do whatever she says. Perhaps powerful enchantments make it so any damage inflicted on the dollface is inflicted on the party responsible, or the dollface must be kept alive because she is the key to accessing the treasure, and if she is killed by the dragon seeking the treasure, said treasure will be magically taken and locked away.
It could even be that the dollface's power simply makes the dragon look at their life and decide that she is more precious than any treasure; the dragon would take her and leave, leaving the treasure safe. (This would require multiple dollfaces, preferably spawned by magic within the dungeon in front of any treasure.)