Shang tends to get exceeding tons of completely undeserved flack for either being too “prim and proper” or too human/emotional. Let me, in exceptionally intelligent and civilized terms, explain to you why the backlash he continually receives is completely unwarranted and holds no water.
When he, a young, admirably disciplined, dutiful man is left in charge of a bunch of seemingly useless probies Shang makes the most sincere and immense of an effort to make the best out of this situation, endeavoring to be a competent, skillful captain and leader. There is no single instance when he wouldn’t judge everyone in the army equally - it’s the abilities, patience, perseverance and diligence that matter to him, not class, privileges or initial physical form. Shang never disregards his responsibility towards the group and even though the men from the army are inclined to be irritatingly stubborn, shamelessly lazy and cling to every single opportunity they have at their disposal to procrastinate on their obligations he always considers it a personal failure and underachievement when they don’t manage to accomplish established goals. Or don’t reach the levels of professionalism and skill required to become capable soldiers and effectively protect their country.
When Shang realizes Ping is not fit to remain in the army let alone participate in battles he immediately instructs a frustration inducing amateur to go home. Mulan originally disguised herself as a man specifically to prevent her father from going to army and consequently - to a war he was not going to survive by any means. This outcome was highly possible despite the severity of her father’s physical condition because not every army leader is mindful and wise enough to notice or acknowledge whether a potential soldier is suited to fight in his current physical and/or psychological state.
Shang IS thoughtful and objective enough to perceive and recognize those things about Ping despite the fact that the latter is not restrained by any physical disabilities and “his” obstinate lack of skills and competence stems directly from a place of not investing enough devotion and determination into training. When Ping/Mulan legitimately starts doing just that, demonstrating eagerness to learn, evolve and excel that’s when Shang comes to value and rely on his best soldier.
It’s not the reveal of Mulan’s gender/gender identity that challenges and temporarily interferes with Shang’s ability to trust her but the fact that one of his soldiers betrayed his loyalty in the most unfortunate and unsettling (at least from Shang’s point of view) manner. Having been deceiving him all along and therefore compromising an enormously important and incredibly meaningful soldier/captain bond. Mutual reliance was sabotaged and for no reason other than because Mulan, by her own admission, fabricated her identity and lied to Shang in order to save her father and protect the latter from having to fulfill his duties at the expense of his safety and most likely his life. She says this right after Shang’s own father just died. Ironically, accepting the kind of fate Mulan managed to prevent hers from facing.
Understandably, Shang - who didn’t even afford himself so much as to grieve over his parent’s tragic demise because he felt obligated to maintain strict composure in front of his soldiers in order to not discourage or bring them down - is bitter and angry when confronted with admittedly shocking set of truths about someone he’s come to consider friend. Yet, he does not let bitterness and confusion get in a way of his unwavering nobility and honorable dignity hence sparing Mulan’s life and acting in accordance with his moral code and principles despite what the law dictates. He is unswervingly rule abiding and idealistic, however, when certain notions conflict with his own concepts of morality and ideology of life he doesn’t think twice before defying them.
Finally, after the incident at the palace, after being - reasonably - reluctant to trust Mulan again because of her elaborate artifice/posing as someone she wasn’t for a large chunk of time, after maturely and constructively working through the tension between them Shang is entirely and absolutely over his underlying morbidness (and remarkably, it only takes Shang few hours to overcome and move on from the aggravation and distress caused by his “friend”’s creative lying scheme. Because he comes to understand where Mulan was coming from despite how considerably her dishonesty hurt him on both a personal and professional level. He doesn’t hold it against her anymore and only allows himself to struggle for impressively short while and clear his head before slipping into action the second his duty and responsibility require it).
When Mulan’s worth and accomplishments are demeaned and belittled on base of her gender Shang is the first to confront this toxic and sexist mindset. While also letting Mulan independently handle the consequences of her decisions in front of a rational, analytical, experienced and insightful person that the Emperor is. As mentioned above, Shang happens to be the epitome of competence and never compromises or dismisses other people’s agency and abilities. Least of all - Mulan’s. And that’s exactly the type of individual she needs by her side, either as a platonic or romantic partner.