I attended the Eid prayer with the Messenger of Allah ﷺ. When he finished the prayer, he said, "We are going to deliver the sermon. Whoever wishes to stay and listen to the sermon may sit, and whoever wishes to leave may go."
حدثنا محمد بن الصباح البزاز حدثنا الفضل بن موسى السيناني حدثنا ابن جريج عن عطاء
شهدت مع رسول الله ﷺ العيد فلما قضى الصلاة قال إنا نخطب فمن أحب أن يجلس للخطبة فليجلس ومن أحب أن يذهب فليذهب
[Its chain is hasan] Nasai transmitted it in "The Two Eids," chapter on the choice between sitting during the sermon for the two Eids, no. 1572, and Ibn Majah, no. 1290, from the hadith of Fadl bin Musa, with this wording. Ibn Khuzayma graded it sahih, no. 1462, as did Hakim, according to the standard of the two Shaykhs, 1/295, and Dhahabi agreed with him. Ibn Jurayj's transmission from Ataa is strong.