The creature trait, Limited Magic Immunity, can be difficult to adjudicate.
But let's take a closer look.
If we look at the Rakshasa from the Basic Rules, it has this feature.
Limited Magic Immunity. The rakshasa can't be affected or detected by spells of 6th level or lower unless it wishes to be. It has advantage on saving throws against all other spells and magical effects.
There is an addition here, from the Monster Manual errata.
Rakshasa (p. 257). Limited magic immunity: the first sentence now reads, “The rakshasa can’t be affected or detected by spells of 6th level or lower unless it wishes to be.”
The original text was
The rakshasa is immune to spells of 6th level or lower unless it wishes to be affected.
Unofficial designer tweets
There are several tweets addressing questions about LMI, but they do not answer all questions, and sometimes create new ones.
The Mike Mearls comment seems to imply a spell targeting you (or your weapon) would still work, but that doesn't agree with Jeremy Crawford's answer regarding Magic Weapon. If we ignore MM's comment, this starts to give us a few more guidelines, like an instantaneous effect that doesn't last, or an effect with a duration would not affect the LMI target.
Reddit
There’s a reddit post with this answer.
Magic users have a whole brace of options against [a creature with Limited Magic Immunity].
- 7th level or above spells (above the LMI threshold)
- Summon spells
- Buff spells on other characters
- Defensive spells like counterspell and shield
- Spells that create an instantaneous effect that then later affects the Rakshasa, like a stone-shaped sword.
- Spells with a radius including the Rakshasha that continue to function at least partly as normal through the LMI such as silence. (The Rakshasa could still cast a spell as the silence does not affect them but the area still prevents all sound from escaping so functionally, they are still silent)
I tend to agree with most of this interpretation, although Counterspell seems to be up for debate, and Shield probably wouldn't work, since although it's defensive, it is a spell effect that has a duration. So to answer your question,
Do Smite Spells work on Tiamat?
Although those spells have a range of self, they are not instantaneous, leaving a non-magical item, rather they are spell effects with a duration, so
No, but ask your DM.
But that doesn't mean all spells are useless.
Further, you didn't ask, but since Divine Smite, the class feature isn't technically a spell, the answer is more difficult. One could argue they are fueled by spell slots and are "magical" in nature, but the ability specifically calls out spells, so in this case, I would imagine a DM may rule a creature with LMI, or specifically Tiamat, is not immune.