As relations with the West have soured over issues from trade and human rights to COVID-19, Chinese diplomats have often been confrontational on the public stage, including on social media, a stridency that some critics see as intended for a domestic audience that nonetheless hurts its foreign ties.