Today's daf, (80),says a certain Chasid was reprimanded and even abandoned by his chaverim for keeping a goat tied to his bed so he could drink the warm milk. It is assur to raise a beheimah daka in Eretz Yisrael. He did it to alleviate his heart pains (angina?). One view is that it was R. Yehuda b. Ilai and another view is that it was R. Yehuda ben Bava. We are told that this was the only sin he ever committed and when he died he attributed his one sin to his not listening to his chaverim on the matter even though he held like Rabban Gamliel. It seemed that he died from that sickness.
Elsewhere, (Sanhedrin 14), we learned that R. Yehuda ben Bava died when he gave semicha to his five talmidim. The Romans shot so many spears into his body that he became like a sieve.
How does that Gemara fit with our Gemara?
Indeed, the Tosefta (BK 8:4) and Yerushalmi Sotah (9:10) say that the Chasid of our story was in fact Rebbi Yehudah Ben Bava.
I did not find anyone who asks your question, but it is clear from the Seder ha'Doros that both these stories happened to the same Rebbi Yehudah Ben Bava. If so we must say that he recovered from his illness.
We must also say that he had time to say Viduy even after the Romans speared him with three hundred spears.
We can say that his medical condition (angina or shortness of breath) prevented him from fleeing the Romans, which ultimately led to his death.