This is precisely why Jiang Liu had Sun Wukong leave before he prepared to execute Muzha.
Firstly, it was to safeguard the bond between Sun Wukong and Nezha; after all, when Sha Wujing was possessed by the demon and attempted to kill Muzha, Jiang Liu agreed in his heart—it was just that Sun Wukong intervened to stop it.
Secondly, and most importantly, he used the excuse that Muzha acted malevolently and considered him an evil demon as reason to strike down Muzha.
If Sun Wukong was here with his Fiery Eyes and Golden Gaze, how could Jiang Liu have justified his actions?
Therefore, it was only after finding an excuse to send Sun Wukong away that Jiang Liu found the pretext to act.
In Jiang Liu's view, Muzha's coming to the edge of the Black Water River was tantamount to seeking his own death.
If Muzha had simply covertly attacked Sha Wujing, perhaps a severe beating would have sufficed.
But upon discovering the soul of the Dragon King of Jing River, Muzha sealed his own fate!