The verse "And whoever turns his back to them on such a day" [Anfal 8:16] was revealed on the day of Badr.
نزلت في يوم بدر ( ومن يولهم يوميذ دبره).
Abu Dawud (2648), Nasai in Kubra (11139), (11140), and Hakim (2/327) narrated it through multiple routes from Dawud bin Abu Hind, from Abu Nadra, from Abu Saeed, who mentioned it. Its chain of transmission is sahih. Hakim said, "A sahih hadith meeting the criteria of Muslim."His statement, "to a group" means the Messenger of Allah ﷺ, because the verse was revealed regarding Badr, and they had no group except the Messenger of Allah ﷺ. But after that, the believers became groups for one another. Therefore its ruling remains established for all believers, and Allah has forbidden the believers, when they meet the enemy, from turning their backs in flight, except as a maneuver in battle or to withdraw to a group of believers wherever they may be. So there is no need to claim it was abrogated. The fact that the verse was revealed on the day of Badr does not negate that fleeing from the battlefront is forbidden for those other than the people of Badr, and it has been established as sahih from the hadith of Abu Hurairah that fleeing is among the destructive sins.