I also agree with the secondary effects occurring, even if the primary damage is negated.
Perhaps shocking grasp creates a sudden flare of light that momentarily dazzles the target, even if they're immune to lightning? Or perhaps the magic directly attacks the nervous system (or animus, or whatever connects the creature's mind/sentience with it's body/form). Even though the creature isn't damaged by the lightning, they're still vulnerable to momentary discombobulation. Arguably, if lightning damage was enough to cause a creature to lose it's reaction, then why doesn't lightning bolt do the same thing? Clearly, the shocking grasp spell is different - it attacks the target in two different ways; direct lightning damage, and a daze-like effect.
As for ray of frost and phantasmal killer, I particularly support keeping the secondary effects for these as they're rarely considered "spells of choice" for their level. Most builds favor cantrips that do higher DPR (e.g. fire bolt, poison spray or even acid splash), so any decision that favors the less-popular ray of frost is okay to me. Likewise, even with the clarification/errata that ensures a phantasmal killer victim makes subsequent saves at end-of-turn (rather than start-of-turn), it's nowhere near as potent as (say) banishment or polymorph. Ensuring that the fear effect goes off, even if the target is immune to psychic, is a way of keeping the spell at least partially relevant.