The Messenger of Allah ﷺ prayed Dhuhr as two rakahs and then said the salam. The people said, "Has the prayer been shortened?" He then stood and prayed two more rakahs, said the salam, and then performed two prostrations after the salam.
حدثنا بهز قال حدثنا شعبة عن سعد بن إبراهيم أنه سمع أبا سلمة يحدث
أن رسول الله ﷺ صلى الظهر ركعتين ثم سلم قالوا قصرت الصلاة قال فقام فصلى ركعتين ثم سلم ثم سجد سجدتين بعد ما سلم
Its isnad is sahih. Nasai reported it, 3/20, no. 1224, in "the Chapter on Forgetfulness, What Is to Be Done by One Who Ends the Prayer After Two Rakahs Out of Forgetfulness," with something close to it. Bukhari reported something similar in meaning, 3/99, no. 1229, Fath al-Bari, in "the Chapter on Forgetfulness, Who Says the Takbir in the Two sujud of Forgetfulness," and Muslim in "the Chapter on Mosques, Forgetfulness in the Prayer and Prostrating for It," 1/399, no. 570.