Whoever sees in his dream that he entered a house and hid in it will be consoled [over a loss]. It is also said that whoever hides himself will have a daughter born to him, because of His saying, the Exalted:
يَتَوَٰرَىٰ مِنَ ٱلْقَوْمِ مِن سُوٓءِ مَا بُشِّرَ بِهِۦٓ ۚ أَيُمْسِكُهُۥ عَلَىٰ هُونٍ أَمْ يَدُسُّهُۥ فِى ٱلتُّرَابِ ۗ أَلَا سَآءَ مَا يَحْكُمُونَ
“He hides himself from the people because of the ill of which he has been informed. Should he keep it in humiliation or bury it in the ground? Unquestionably, evil is what they decide.”
Quran 16:59 · Saheeh International
Hiding oneself in a dream is a sign of relying and depending on whatever one hides behind, or on whoever it points to. If he hides and leans against a tree, he will rely on a scholar. If the dreamer has a pregnant woman, she will bear a female. Hiding oneself in a dream may indicate hypocrisy and speaking of evil deeds.