Yoda may have let Dooku escape while saving Obi-wan and Anakin. But its a totally different scenario from Lukes. Yoda knew that Luke could only defeat the sith as a fully trained Jedi. And he knew the rebellion needed the help of the Jedi to overthrow the Sith. If Luke was killed, the rebellion was dead. Because Yoda wouldnt have enough time to train Leia ( Probably wouldnt even find her before he died). He was simply stating to Luke that if he goes to save them and ends up dead, then everything they all had fought and suffered for would die too.