Lea Michele, whose star turn in the musical has reversed its flagging fortunes, will stay with the show to the end.