The Emperor makes no sense in killing the sons
The act that the emperor kills his third son makes no sense to me. And also (indirectly) killed his second son.
As an Chinese emperor, he sure has to have successors to inherit the throne and long the royalty. Even if he later has another son, he will be too young to take the throne when him die and thus, create a chaos of generals killing each other for the throne ( and then the young emperor). That's what happens in China, Japan and Vietnam.
So from a point of view of a Vietnamese, I see no sense in him killing them. Even if he really really hates them.