The wildlife shouldn't be inherently hostile to begin with, as animals only attack if sufficiently provoked/threatened. Once they do attack, however, they don't stop until either they're dead or the threat is gone.
Human opponents, on the other hand, will attack for any of a number of reasons, and may/not choose to bail if things 'go south'. As such, it would only make sense if some of them, upon realizing they haven't a chance in hell of winning, chose to get the hell out of Dodge. Those beyond sense (cracked-out Raiders, for example) would probably not flee, as their drugged state would put them past caring and/or even knowing in the first place, however most opponents should flee in such situations as self-preservation would naturally kick in at that point.
Robots should neither flee nor surrender, as they do not know fear or pain, and absolutely will not stop until either you or they are dead. They should also not attack in the first place unless programmed to defend their location, since they will only do what they've been told to. This even applies to malfunctioning ones, since even the most severe malfunction wouldn't write new code.
Ghouls and Super Mutants are something of a mixed bag. Feral Ghouls are completely insane, so would almost certainly attack anything/one that got near them, as would most Super Mutants due to being too dumb to tell the difference between 'friend' and 'foe' (or, for that matter, to even understand the related concepts). Some SMs, however, should act more 'human' (for lack of a better descriptor) in this regard, since it's been shown that they can (albeit rarely) be capable of the proper reasoning.