It is best to avoid the sweets since it is an innovation.
The Permanent Committee was asked:
O Scholars, what is the ruling on the following issue: Did the Messenger of Allah (ﷺ) distribute something of food, drink, and sweets after the completion of the Noble Quran in the Qiyaam of Ramadan? Or did any of the Companions (may Allah be pleased with them) or the Tabi’een or the Tabi at-Tabi’een and the pious Salaf? If this affair is something established in the generations who were testified to have goodness, then inform us with the reference to the Book, page number, volume, and publication [where it is mentioned]. If it is not established, then teach us the evidence: is this action allowed legislatively if someone does it holding fast to it and believing that these food, drink, and sweets are a means from the means of blessings?
“It is not established from the Prophet (ﷺ) nor any of the Companions (may Allah be pleased with them) nor any of the Tab’ieen nor the Scholars of the Salaf, as far as we know, that they distributed food, drink, and sweets when they finished reciting the Quran in the night prayer in Ramadan. Nor that they held fast to that. Rather that is a newly-invented innovation in the religion due to it being immediately after an act of worship, performed due to this worship, and the time for it is fixed to the time of this worship. Every innovation in the religion is misguidance due it accusing the Legislation of not being complete. Allah said:
الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ الإِسْلامَ دِينًا
This day, I have perfected your religion for you, completed My Favour upon you, and have chosen for you Islam as your religion
It is established from al-Irbaad ibn Saariyah (may Allah be pleased with) who said:
وعظنا رسول الله صلى الله عليه وسلم موعظة وجلت منها القلوب وذرفت منها العيون، فقلنا: يا رسول الله، كأنها موعظة مودع فأوصنا، فقال: أوصيكم بتقوى الله، وبالسمع والطاعة، وإن تأمر عليكم عبد، فإنه من يعش منكم فسيرى اختلافًا كثيرًا، فعليكم بسنتي وسنة الخلفاء الراشدين المهديين من بعدي، تمسكوا بها، وعضو ا عليها بالنواجذ، وإياكم ومحدثات الأمور، فإن كل محدثة بدعة، وكل بدعة ضلالة .
The Messenger of Allah (peace and blessings of Allah be upon him) gave us a sermon by which our hearts were filled with fear and tears came to our eyes. So we said, “O Messenger of Allah! It is as though this is a farewell sermon, so counsel us.” He (peace and blessings of Allah be upon him) said, “I counsel you to have taqwa (fear) of Allah, and to listen and obey [your leader], even if a slave were to become your ameer. Verily he among you who lives long will see great controversy, so you must keep to my Sunnah and to the Sunnah of the Khulafa ar-Rashideen (the rightly guided caliphs), those who guide to the right way. Hold fast to it and bite onto it with your molar teeth. Beware of newly invented matters [in the religion], for verily every bidah (innovation) is misguidance.
[Saheeh Sunan Abi Dawood (no. 4607)]
It is established that Malik ibn Anas (may have mercy upon him) said: “Whoever innovates in the religion what is not from it, claims that Muhammad has betrayed the message. For verily Allah the Exalted said:
This day, I have perfected your religion for you, completed My Favour upon you, and have chosen for you Islam as your religion.
So what was not religion at that time is not religion today”.
However, if the likes of that occurred sometimes without [people] holding fast to it, then there is no harm”
With Allah is Tawfeeq and may peace and blessings be upon our Prophet Muhammad, his family, and Companions altogether”
Faisal Ibn Abdul Qaadir Ibn Hassan