Praise be to Allah, and peace and blessings be upon the Messenger of Allah and his family.
“The Sunnah is for the fasting person to hasten to break the fast as soon as he is certain that the sun has set, because of the hadiths “The people will continue to be fine so long as they hasten to break the fast ” and “The most beloved of the slaves of Allah to Allah are those who are quickest to break the fast. ”
The best way for the one who is fasting is to break his fast with a few dates, then delay eating until after Maghrib prayer, so that he may combine the Sunnah of hastening to break the fast and praying Maghrib at the beginning of its time, in congregation, following the example of the Prophet (blessings and peace of Allah be upon him).
With regard to the hadiths, “There is no prayer in the presence of food or when resisting the urge to relieve oneself” and “If ‘Isha and dinner come at the same time, start with dinner,” and similar reports, what is meant is that if a person is offered food or if he comes to eat, then he should start with the food before praying, so that he can pray without his mind being focused on the food and his prayer then will be offered with proper focus and humility. But he should not ask for food to be brought before praying if that means that he will miss out on offering the prayer at the beginning of its time or praying in congregation.
And Allah is the source of strength; may Allah send blessings and peace upon our Prophet Muhammad and his family and Companions.” (Fatawa Al-Lajnah Al-Daimah – Al-Majmu’ah Al-Thaniyyah, 9/32, Shaykh ‘Abd al-‘Aziz ibn Baz, Shaykh ‘Abd al-‘Aziz Al al-Shaykh, Shaykh ‘Abd-Allah ibn Ghadyan, Shaykh Salih al-Fawzan, Shaykh Bakr Abu Zayd)
And Allah knows best.