On the day of Uhud, the Messenger of Allah ﷺ placed Abdullah bin Jubayr in charge of the archers, who were fifty men, and said, "If you see the enemy, and even if you see the birds snatching us up, do not leave your position."When they saw the spoils, they said, "Take the spoils, take the spoils!"Abdullah said, "Did the Messenger of Allah ﷺ not tell you, 'Do not leave your position'?"Someone else said, "Then was revealed the verse, 'And you disobeyed after He had shown you what you love' [Al Imran 3:152]." He means, you disobeyed the Messenger after He had shown you the spoils and the defeat of the enemy.
حدثنا يحيى بن آدم حدثنا زهير عن أبي إسحاق
جعل رسول الله ﷺ على الرماة وكانوا خمسين رجلا عبد الله بن جبير يوم أحد وقال إن رأيتم العدو ورأيتم الطير تخطفنا فلا تبرحوا فلما رأوا الغنائم قالوا عليكم الغنائم فقال عبد الله ألم يقل رسول الله ﷺ لا تبرحوا قال غيره فنزلت {وعصيتم من بعد ما أراكم ما تحبون} يقول عصيتم الرسول من بعد ما أراكم الغنائم وهزيمة العدو
Its isnad is sahih, and it is found in Bukhari 6/162, no. 3039, in the book of jihad, chapter on what is disliked concerning disputing, and Abu Dawud 3/51, no. 2662.