The problem with Song dynasty is civilian control of military
The founding emperor of Song came to the throne via Coup d'etat. He made a conscious decision to place the military under tight civilian control. So his family could stay in power. The civilian control weakened the military. Yue Fei was killed to keep the military from threatenning the rule of the emperor.