The Prophet ﷺ said, "Complete the front row first, then the one behind it, and let any shortage be in the rearmost row."
حدثنا عبد الوهاب عن سعيد عن قتادة
أن النبي ﷺ قال أتموا الصف المقدم ثم الذي يليه فما كان من نقص فليكن في الصف المؤخر
Its isnad is sahih, mentioned previously at 13180.