The evidence for praying the four Sunnah before the Fard of Isha is a Hadith in Sahih al-Bukhari. Although it does not specify four Rakahs before Isha, it does encourage praying between every Adhan and Iqaamah.
عَنْ عَبْدِ اللَّهِ بْنِ مُغَفَّلٍ، قَالَ: قَالَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «بَيْنَ كُلِّ أَذَانَيْنِ صَلاَةٌ، بَيْنَ كُلِّ أَذَانَيْنِ صَلاَةٌ»، ثُمَّ قَالَ فِي الثَّالِثَةِ: «لِمَنْ شَاءَ»
Abdullah ibn al-Mughfal said, the Prophet ﷺ said, ‘Between every two Adhans is prayer. Between every two Adhans is prayer. And upon saying it the third time he ﷺ added, for anyone who wishes.’ (Sahih al-Bukhari, 627).
In the Hadith above we find evidence for the four Sunnah before the Fard of Isha. Since the Hadith does not specify a number of Rakah between Adhan and Iqaamah, it can be applied to two or four Rakah. There are some narrations that specify four Rakah, however they are of questionable authenticity. Whereas the Hadith above is undoubtedly sound, considering the fact that it is a Musnad Hadith from Sahih al-Bukhari.
(وَيُسْتَحَبُّ أَرْبَعٌ قَبْلَ الْعَصْرِ، وَقَبْلَ الْعِشَاءِ وَبَعْدَهَا بِتَسْلِيمَةٍ) وَإِنْ شَاءَ رَكْعَتَيْنِ. (الدر المختار شرح تنوير الأبصار).
And four Rakah before Asr is Mustahab (recommended), and likewise before Isha and after it, with a single set of Salaams. And if he wishes he can pray two Rakahs (Imam Ala al-Deen al-Haskafi, al-Dur al-Mukhtaar).
As we see in the Nass (text) above, Hanafi scholars where not strict on four Rakah before Isha. Rather they mentioned two or four. This is due to the fact that the evidence (Daleel) for Sunnah Rakah before Isha is not specific enough; rather it is open to two or four Rakah.
It is important to know that many of our scholars referred to the four Rakah before Isha as Nafl or Mandoob and not strictly as Sunnah. In the subcontinent, people tend to call them Sunnah Sunnah Ghair Muakkadah, which is mentioned in some of our books although calling them Mandoob, Mustahab or Nafl is more widespread. However, there is very little difference between Nafl and Sunnah Ghair Muakkadah, they are almost synonymous. Therefore, little focus is given to differentiating between them and they are used interchangeably.
(قَوْلُهُ: وَأَرْبَعًا قَبْلَ الْعِشَاءِ) وَهُنَّ مُسْتَحَبَّاتٌ. (الجوهرة النيرة).
And his saying four Rakah before Isha, (I say) they are Mustahab. (Imam al-Haddadi, al-Jowharah).
وَلَمْ يَذْكُرْ الْأَرْبَعَ قَبْلَ الْعِشَاءِ فَلِهَذَا كَانَ مُسْتَحَبًّا
And he did not mention the four before Isha, therefore they are Mustahab. (Imam al-Marghinani, al-Hidaayah).
وندب أربع قبل العشاء. (مراقي الفلاح).
And four Rakah before Isha are Mandoob (recommended). (Imam al-Shurunbulali, Maraaqi al-Falah).
وَأَمَّا مَا قَبْلَ الْعِشَاءِ فَمَنْدُوبٌ لَا يُقْضَى أَصْلًا. (الدر المختار شرح تنوير الأبصار).
As for the four Rakah before Isha, they are Mandoob. Therefore, they are never made up if missed (Qadaa). (Imam Ala al-Deen al-Haskafi, al-Dur al-Mukhtaar).
As we see from the Nusoos (texts) above, the four Rakah before Isha are usually referred to as Mandoob or Mustahab. Both of these are essentially synonyms for Nafl (recommended). It is actually quite rare to find scholars who referred to the four Rakah as Sunnah Ghayr Moakadah, and even when they did so, often they were conflated with Mustahab or Mandoob.
(وأربع قبل العشاء) وهذه أيضاً غير مؤكدة لما قلنا، ولهذا كان مستحباً.
And four Rakah before Isha. This is also (Sunnah) Ghayhr Moakadah, therefore they are Mustahab. (Imam al-Ayni, Sharh Tuhfatu al-Mulook).
I would like to remind readers that Q and A is a useful means of learning but it is not sufficient. It is certainly not a substitute for classes. In the answer above, many technical terms and concepts have been referred to. A person who has not studied courses on Hanafi Fiqh is liable to misunderstand or become confused.
And Allah (Most High) Knows Best.
– Answered by Shaykh Noorud-deen Rashid (17.09.2021)
Sunnah Ghair Muakkadah and Nafl in the Hanafi Madhab
Is it sufficient to learn the Deen through Q&A only?
See also (video):