Hmm. If the units are moving with Unity’s pathfinding system, maybe using the included “Flee” action (so that they flee/avoid from one another) would work well here, but maybe not depending on what you are after.
Even though the action is named “Flee”, what it basically does, is that it tries to keep the object a specific distance away from another target object, so it could be used for avoidance to some degree.