The president notched both sweeping wins and losses as the court’s conservative majority marched on.