Is “He released Yan Yan out of righteousness and defeated Zhang He at Baxi” true?

attested in history

The Records of the Three Kingdoms, Biography of Zhang Fei, records that he moved Yan Yan and released him; in the Battle of Baxi, he used an ambush in a narrow path to defeat the famous Wei general Zhang He, showing great strategic acumen.

Zhang Fei

In official histories, he is a famous general who respects gentlemen but is harsh on common soldiers, skilled in both civil and military affairs; in novels, he is often depicted as a rough and rude man.

Other claims about Zhang Fei