SHANGHAI—China’s belligerence during the Obama era began with hubris—a conviction that post-financial-crisis America was in irreversible decline and its own rise was unstoppable.

That triumphant sense of destiny abruptly ended decades of foreign-policy caution. Chinese dredgers ripped up South China Sea reefs to build militarized islands. Paramilitary fleets swarmed around islets disputed with Japan in the East China Sea. And China served notice that it not only intended to contest the U.S.-led regional security order, but...