Based on Jeremy Crawford's tweet, if a target is under the effect of an ongoing spell, and then the target changes such that it is no longer a valid target, the spell no longer effects them.
But does the spell end, or is it merely suppressed?
For example, suppose a human has been charmed by a dominate person spell. A friendly wizard casts polymorph on them; they fail their save and get turned into a sheep. This makes their type change to Beast, which is an invalid target for the dominate person spell, and the charm effect ends. The next turn, the wizard chooses not to concentrate, so polymorph ends and the target pops back into human form.
Assuming the dominating caster has maintained their concentration (if possible), did the spell simply end when the target became invalid, or does being invalid just suppress the dominate spell, which reasserts itself once the target is once more valid, like it would in an antimagic field?