I used to hear that no prophet dies until he is given a choice between this world and the hereafter. Then I heard the Prophet ﷺ say during the illness in which he died, when his voice had grown hoarse, "With those upon whom Allah has bestowed favor" [Nisa 4:69], reciting the verse. So I realized that he had been given the choice.
حدثني محمد بن بشار حدثنا غندر حدثنا شعبة عن سعد عن عروة
كنت أسمع أنه لا يموت نبي حتى يخير بين الدنيا والآخرة فسمعت النبي ﷺ يقول في مرضه الذي مات فيه وأخذته بحة يقول {مع الذين أنعم الله عليهم} الآية فظننت أنه خير