The Prophet ﷺ said, "Abu Dharr, there will be rulers after me who will let the prayer die. So pray the prayer at its proper time. If you pray it at its proper time, then whatever you pray with them will count as a voluntary prayer for you. Otherwise, you will have at least secured your prayer."
حدثنا محمد بن موسى البصري حدثنا جعفر بن سليمان الضبعي عن أبي عمران الجوني عن عبد الله بن الصامت
قال النبي ﷺ يا أبا ذر أمراء يكونون بعدي يميتون الصلاة فصل الصلاة لوقتها فإن صليت لوقتها كانت لك نافلة وإلا كنت قد أحرزت صلاتك
Muslim also related it, in the Book of Mosques, chapter on the dislike of delaying the prayer beyond its preferred time, etc., hadith no. 648, from the hadith of Jafar bin Sulayman, with the same wording.On this topic there are also narrations from Abdullah bin Masud [Ibn Majah, no. 1255] and Ubada bin Samit [Abu Dawud, no. 433, and Ibn Majah, no. 1257].