The description of the phantasmal killer spell says (PHB p. 265, emphases mine):
You tap into the nightmares of a creature you can see within range and
create an illusory manifestation of its deepest fears, visible only to
that creature. The target must make a Wisdom saving throw. On a
failed save, the target becomes frightened for the duration. At the
start of each of the target’s turns before the spell ends, the target
must succeed on a Wisdom saving throw or take 4d10 psychic damage. On
a successful save, the spell ends.
My question is regarding the damage that the creature takes each round. The spell description doesn't cover what happens if the creature becomes immune to being frightened, or what happens if someone removes the frightened condition from the target, etc.
Per RAW and per RAI, does phantasmal killer's psychic damage affect creatures immune to being frightened? And if the creature becomes immune during the spell duration? And what happens if someone removes only the frightened condition?