Tufayl bin Sakhbara reported,

A Muslim man saw in a dream that he met a man from the People of the Book, who said to him, "What an excellent people you would be, were it not that you commit shirk. You say, 'Whatever Allah wills and Muhammad wills.'"This was mentioned to the Prophet ﷺ, and he said, "By Allah, I had recognized this concern for you. Say instead, 'Whatever Allah wills, then Muhammad wills.'"

Azami 462

Sahih

عن الطفيل بن سخبرة- أخي عائشة لأمها- قال

إن رجلا من المسلمين رأى في النوم أنه لقي رجلا من أهل الكتاب فقال: نعم القوم أنتم لولا أنكم تشركون، تقولون: ما شاء الله وشاء محمد. وذكر ذلك للنبي ﷺ فقال: أما والله إن كنت لأعرفها لكم. قولوا: ما شاء الله، ثم شاء محمد.

الأعظمي 462صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Faith in Allah عز وجل
Section
Prohibition of saying "What Allah wills and you will" out of fear of equating them
Numbering
Jami al-Kamil 462 (2nd edition)
Azami 462