With a burst of diplomatic and military moves, threats to restrict key exports and devastating cyberattacks on American networks, Beijing has in recent weeks broadcast that, unlike during Donald Trump’s first term, it is prepared to confront America’s next president head-on.