The Messenger of Allah ﷺ said, "Once the prayer has been called to begin, no prayer is to be performed except the obligatory one."
أخبرنا سويد بن نصر قال أنبأنا عبد الله بن المبارك عن زكريا قال حدثني عمرو بن دينار قال سمعت عطاء بن يسار يحدث
قال رسول الله ﷺ إذا أقيمت الصلاة فلا صلاة إلا المكتوبة
Muslim recorded it in "Prayer of the Traveler," in the chapter "The Dislike of Beginning a Voluntary Prayer After the Muezzin Has Begun," etc., hadith 64/710, from the hadith of Zakariya bin Ishaq, with the same wording. It is also found in Al-Kubra, hadith 937.