On the diameter of sets with maximum number of unit distances