You gain the ability to split your move before you decide to grapple/shove
The sections on grappling and shoving both include the sentence:
If you're able to make multiple attacks with the Attack action, this attack replaces one of them.
So, if you have the Extra Attack feature, in order to make a grapple attack, you take the Attack action, which includes multiple weapon attacks, and then you replace one or more of those weapon attacks. But since you've already "taken an action that includes more than one weapon attack", you can move between those attacks. Or to put it another way, you gain the ability to split your move between attacks when you take the Attack action, before making (or not making) any weapon attacks. This ability can't possibly depend on whether you actually end up making multiple weapon attacks with your action, because that isn't determined until your action is complete. Any number of things could happen during your action to prevent you from making multiple weapon attacks: you could replace some or all of your weapon attacks with grapple/shove attempts; you could get pushed out of range by a readied Thunderwave; or you could lose one or more attacks entirely to a Sanctuary spell. But regardless of what happens, you can't retroactively lose the ability to split your movement between attacks.
This is similar to the logic that allows spells like Shield to work: the trigger for the spell is being hit with an attack, but the spell causes the attack to miss, which means the spell works even though it prevented its trigger from happening. Likewise, replacing some of the weapon attacks from the Attack action doesn't change the fact that it was initially an Attack action that included multiple weapon attacks.
A concrete example
For a concrete example of why this must be the case, let's consider the example given in the section on moving between attacks:
a fighter who can make two attacks with the Extra Attack feature and who has a speed of 25 feet could move 10 feet, make an attack, move 15 feet, and then attack again.
Suppose the fighter chose to replace their second weapon attack with a shove attack, after they have already split their movement between the two attacks. Their Attack action now involves only one weapon attack. Does this invalidate or undo the split move that got them to the second creature? I don't think so. The decision of whether to replace an attack comes after the decision to take the Attack action, and in this case it even comes after the decision to split movement between weapon attacks. So it doesn't make sense that your available choices in an earlier decision (splitting your move) can be constrained by a choice you only make later (replacing an attack). The most logical conclusion is that the ability to split movement between weapon attacks is "unlocked" as soon as you take the Attack action and remains so throughout that action, whether or not you actually end up making multiple weapon attacks.