The square it was shifting to must be declared.
Keeping 'inertia' instead will lead to interesting side effects that can be potentially abused.
Mob wants to shift back 1. You push it 1 square diagonally. It now has to shift off a cliff .. and since shifting is not forced movement, there's no save.
Does this same reasoning work for movement? As in I need to declare every space of my movement ahead of time? Could make a difference for something that is moving by you (especially a fighter) to decide when to take your OA. Or is a move different in this regard? And are there any places where these rules are specified? I've read through the players pretty well (IMO) but haven't seen anything with regards to "timing". I haven't really read the DMG though. Is it in there?