The Biden administration has leveled unusually tough criticism against Mexico, an ally, and Nicaragua, an adversary.