The Prophet ﷺ offered the 'Eid prayer and said: 'Whoever would like to leave, let him leave, and whoever would like to stay for the Khutbah, let him stay." (Using translation from Nasāʾī 1571)
أَنَّ النَّبِيَّ ﷺ صَلَّى الْعِيدَ وَقَالَ «مَنْ أَحَبَّ أَنْ يَنْصَرِفَ فَلْيَنْصَرِفْ وَمَنْ أَحَبَّ أَنْ يُقِيمَ لِلْخُطْبَةِ فَلْيَقُمُ»