I was wondering whether you could take a move action in the middle of your Cast a Spell action (similar to moving between attacks), but the answers to this question say no.
However, can you cast the spell as part of the Ready action and use a trigger of "when I stop moving" or "when I move to that spot" (or something similar) and then expend the your reaction for the turn to release the spell?
And does this actually avoid triggering Mage Slayer or a Counterspell if the casting takes place out of sight or out of range?
Ready
When you ready a spell, you cast it as normal but hold its energy, which you release with your reaction when the trigger occurs. To be readied, a spell must have a casting time o f 1 action, and holding onto the spell’s magic requires concentration.
Mage Slayer
When a creature within 5 feet of you casts a spell, you can use your reaction to make a melee weapon attack against that creature.
Counterspell
Casting Time: 1 reaction, which you take when you see a creature within 60 feet of you casting a spell
You attempt to interrupt a creature in the process of casting a spell.