General immunity question

Ive been playing a lich and having a blast.
However, there is a big question on my mind and i cant find any info on the subject.
Regarding immunity’s to certain status effects like nausiated or level drain / ability score damage.
If an enemy has immunity to such an effect, what happens when i cast a spell on it with the lich mythic feat deadly magic.

Will the effect still occur even if the subject has immunity to level drain for example?
Or is it purely based on the spell itself.
So will the spell trigger but not the effect?

Kind of important choice to make regarding the lich’s arsenal.
I have already taken energy conversion and immunity bypass to said energy damage.
This seems to work just fine, but regarding status effects im left in the dark.
Since im unsure if this is able to bypass a pure immunity to an effect rather than a spell.
Hope someone tested it or has more experience with playing a lich to answer this question.