No, it's not an opportunity attack
The relevant phrasing in the Sentinel feat (PHB, p. 169-170) is:
When you hit a creature with an opportunity attack, the creature's speed becomes 0 for the rest of the turn.
So the prerequisite for this feature is that you must hit a creature with an opportunity attack.
The relevant phrasing in the War Caster feat (PHB, p. 170) is:
When a hostile creature's movement provokes an opportunity attack from you, you can use your reaction to cast a spell at the creature, rather than making an opportunity attack. The spell must have a casting time of 1 action and must target only that creature.
While the trigger is a situation that provides an opportunity attack, it specifically states that no opportunity attack is made, and you instead us a reaction for the spell casting. Thus, the Sentinel feat is not triggered.