There are many ways you could achieve this. You could, for instance, maintain a HashSet of animals that have been dragged like this:
private HashSet<GameAnimal> _draggedAnimals = new HashSet<GameAnimal>
Having done this, you would need to do two things. First of all, in the if condition where you drop the animal, you would also add the animal to the HashSet.
if (dist < 50)
{
animal.transform.position = blackAnimals[index].transform.position;
_draggedAnimals.Add(animal);
}
With this in place, you can prevent the animal movement by adding the following to the start of both the dragAnimal and dropAnimal methods.
if (_draggedAnimals.Contains(animal))
{
return;
}
In other words, if the hashset contains the animal, you have dragged and dropped it already so you don't want to do any more processing in your drag and drop methods.