I will just write what Imam Ibn Hajr (a Shafa’ii scholar) said concerning the issue from the perspective of the madhabs, fuqaha and muhadithin. What we wish to dispute is the common and innovated (u will see why, as ibn hajr noted) notion that seeing the Prophet ‘alahi salam in a dream means you saw him *actually*, whereas that is not the case. It is an image from Allah in a dream. If the Prophet (‘alahi salam) tells us of something in a dream which is about to happen, it does not mean he knows the unseesn actually. It means that the dream will be true and its contents would come to pass. I will just present the translation which I rendered: [Ibn Hajar’s explanation is briefly mentioned here , here and here, but we will expand it with  further excerpts]

Ibn Hajar Al-Asqalani (Al-Shafa’ii) said (commenting on hadith no 6748 in fath al-bari):

Imam Al-Qurtubi (aMaliki scholar, author of the famous Tafsir Al-Qurtubi) said: “There are different opinions about the explanation of this hadith ( “Whoever sees me in a dream will see me when he is awake; the Shaytaan cannot take my shape”). Some people said they would take the literal meaning, that whoever sees him in a dream sees him actually, and hence seeing him in a dream is the same as seeing him while awake. But this is an opinion which is so baseless (fasid) that even basic intellect is enough to know it is wrong. This opinion necessiates that anyone who sees him (in a dream) will see him in the form he died in and also that two persons should not be able to see him at two different places if they dream at the same time. This opinion also means that he (sallallaho’alaihiwasallam) is alive, leaves his grave, walks about in the markets, speaks to people and they speak to him. It also entails that his grave does not contain his body, and hence his grave is empty and those visiting are just going to just (an empty) grave and say salam (greetings) to someone who is not there, since (according to this claim) he can really be seen at anytime of the day (in a dream) in places other than his grave. Anyone who has the least grip on his senses will not hold on to such ignorance.”

Ibn Battal (author of an earlier explanation of Sahih Al-Bukhari) said: “The hadith ‘ will see me when he is awake’ means that the dream is true and will come to pass. It does not mean that he will see him on the Day of Judgment, since there everyone would be able to see him, whether they saw him in a dream or not. ”

Al-Maziri said, “it may mean that it is specific to the people of his time, that if they see him in a dream, they will see him while awake after they meet him by doing hijra (emigration). This was sign which he was told by Wahi (revelation)”

Al-Qadhi (Al-‘Iyadh) said: “It means that he will soon find the dream to be true and it will come to pass when he is awake.”

About some reports that some Salihoon (pious people) saw him in dreams and then saw him (sallallaho’alaihiwasallam) while awake too and asked him of various things, I (Ibn Hajar) say: “This is very problematic (muskil jiddan). If it were really like that, then these people would have been Companions (sahabah), and it would be possible that there would be Companions (Sahabah) right uptil the Day of Judgment! What unsettles this claim is that numerous people saw him in dream, but never reported seeing him when awake, but the news given by the truthful (i.e. the Prophet ‘alaihi salam) does not remain unfulfilled. As we mentioned earier, Al-Qurtubi was very severely against the notion that seeing him in a dream means seeing him really (haqeeqatahu).”

END OF QUOTES from Fath Al-Bari of Ibn Hajar.