A lich listed in a WotC Adventure can cast wall of force.
More specifically the Archlich in Tomb of Annihiliation
We are trying to determine what the lich could do if it were to cast a spherical Wall of Force around itself.
Wall of force creates a barrier indestructable to physical attacks but also transparent.
According to answers in this question, spells require a direct connection from their caster to their target. Additionally, if we understand correctly, Jeremy Crawford has also ruled that transparent walls create Total Cover (i.e. he said that sight is not a requirement.) Thus, given that spells cannot target targets under Total Cover, even targets that are seen cannot be targeted with spells. Lastly, as described in the answer, the only spell that ignores cover is sacred flame.
Do these interpretations mean that everything outside of a spherical wall of force is under Total Cover to a creature inside of it (and thus untargetable with spells except for sacred flame) - and does that mean that not only spells but also Gaze Effects are ineffective as well?