Hi,
the most reliable way is to get the velocity of the GameObject and then check the x value, if it's negative then you flip the sprite, if it's positive you don't flip it.
this way no matter happens, the sprite will always face the direction it's heading too, however if you have some bouncing back or similar behavior you will be better off using user Inputs as the source for flipping sprites.
Bye,
Jean