In a dream it is returning to God Almighty and turning to Him in repentance, because of His saying, Exalted is He:
فَفِرُّوٓا۟ إِلَى ٱللَّهِ ۖ إِنِّى لَكُم مِّنْهُ نَذِيرٌ مُّبِينٌ
“So flee to Allāh. Indeed, I am to you from Him a clear warner.”
Quran 51:50 · Saheeh International
Fleeing is authority, safety, repentance and death. Whoever sees that he is fleeing from an enemy he fears will be safe from him. If a scholar sees fleeing, he will attain a judgeship, because Moses, peace be upon him, judged after his flight.
(Whoever sees) that he is fleeing and knows what he is fleeing from will repent. The flight of an army is victory, and the flight of the unbelievers is flight in the literal sense, because of His saying, Exalted is He:
وَأَنزَلَ ٱلَّذِينَ ظَـٰهَرُوهُم مِّنْ أَهْلِ ٱلْكِتَـٰبِ مِن صَيَاصِيهِمْ وَقَذَفَ فِى قُلُوبِهِمُ ٱلرُّعْبَ فَرِيقًا تَقْتُلُونَ وَتَأْسِرُونَ فَرِيقًا
“And He brought down those who supported them among the People of the Scripture from their fortresses and cast terror into their hearts [so that] a party [i.e., their men] you killed, and you took captive a party [i.e., the women and children].”
Quran 33:26 · Saheeh International