The chaotic summit in Rio de Janeiro highlighted the Brazilian president’s inability to bridge growing divisions between global superpowers.