It has been narrated (through a different chain of transmitters) on the authority of Jabir who said: While swearing fealty to the Holy Prophet (ﷺ) we did not take the oath to death but that we would not run away (from the battlefield).
´Jabir said:` "We did not give our pledge to the Messenger of Allah for death, rather we pledged not to flee (from battle)."
Hafiz Muhammad Ameen
The meaning of pledging allegiance unto death is also this: that we will remain steadfast and will not flee, even if circumstances of death arise. The intent of Hazrat Jabir radi Allahu anhu is that, at the time of pledging allegiance, we did not say, "even if we die." We only said that we will not flee. However, in meaning and outcome, there is no difference. Some people have also used the word "death," saying that we will not flee, even if death comes, as is explicitly stated in the following narration.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 4163