In BG3, the game determines first if a target 'can' be shoved in the direction intended - if you use the shove skill it'll give you a trajectory and if the trajectory is red then you know the enemy will not move, even if you shove successfully.

This is the case for Eldritch blast as well, except that you can't see the trajectory to check it.