The language is unclear
The intent may have been that you must wait for your Action to complete before utilizing your Bonus Action.
Jeremy Crawford had previously tweeted that Bonus Action timing was completely up to the player regardless of the trigger requirement. While this gave a lot of freedom of choice, it wasn't really fully in tune with the written rules on Bonus Action timing (emphasis mine).
You choose when to take a bonus action during your turn, unless the bonus action's timing is specified...
However, that tweet has been updated after realizing his mistake.
Clarification about bonus actions: if a feature says you can do X as a bonus action if you do Y, you must do Y before you can do X. For Shield Master, that means the bonus action must come after the Attack action. You decide when it happens afterward that turn.
He further clarified with this tweet
No general rule allows you to insert a bonus action between attacks in a single action. You can interrupt a multiple-attack action with a bonus action/reaction only if the trigger of the bonus action/reaction is an attack, rather than the action.
But that clarification was...wait for it...further clarified again:
"My tweet below was addressing bonus actions and reactions that have triggers. A bonus action that has no trigger—such as Cunning Action and the misty step spell—can take place whenever you want on your turn (PH, 189)
The RAW and the Crawford
It seems clear that Crawford's intent for Bonus Action triggers is that there is a requirement for the triggering Action to fully complete before you can take the Bonus Action. If you go by this, then you are not able to take your Bonus Action inside of (interrupting) your Attack Action.
A question of wording
However, as stated above, GWM is not triggered by the completion of an Action, but by the killing of or reducing an enemy to 0 HP. Given that the trigger is not based on the Attack Action but on the result of a hit combined with the rule on choosing when to take a bonus action during your turn, then it seems possible to interrupt your Action.
Which way to go?
I understand what Crawford is saying in that Actions are complete events that can not be interrupted...except by movement. His clarification that you can't interrupt one action (Attack) with another (Bonus Action) makes some sense, but given the precedent of allowing movement inside of an Action and that the trigger for GWM is not the Action but an event, a GM could rule at their table to allow it.
Crawford's intent here is understandable, but it still doesn't make 100% logical sense given that you can already interrupt your action with movement and/or reactions.
At my table, I generally let my players shift and shuffle actions as long as they aren't actually limited by a clear mechanic. In this case, it makes more than good sense to allow the player this and I haven't seen any issues with it at my tables.
You could certainly Dash first to increase you movement allowance, then attack the first mook, then move, then attack the second mook. That's not exactly what you're asking about though, since you want to see the result of the first attack before deciding to Dash.
In the strict rules as written, however, only movement is explicitly allowed to be broken up arbitrarily. Taking the Attack action doesn't "add to your attack allowance" the way Dash adds to your movement allowance.
Implicitly, when you take an action, you are committed to completing the entire action unless you have a rule that says otherwise. "Moving Between Attacks" is one such rule, and object interaction (PH p.190) is another:
You can also interact with one object or feature of the environment for free, during either your move or your action.
By this reading, you have to complete all the Extra Attacks that are part of the initial Attack action before using Action Surge to Dash.
Best Answer
You gain the ability to split your move before you decide to grapple/shove
The sections on grappling and shoving both include the sentence:
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:
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.