Limited Magic Immunity

The creature is immune to spells of 6th level or lower unless it wishes to be affected. It has advantage on saving throws against all other spells and magical effects. (Rakshasa, pp. 257, MM)