The Messenger of Allah ﷺ at times got up in the morning in a state of junub on account of having a sexual intercourse (with his wives during night) but not due to sexual dreams in the month of Ramadan, and would observe fast.
عَنْ عَائِشَةَ وَأُمِّ سَلَمَةَ زَوْجَىِ النَّبِيِّ ﷺ أَنَّهُمَا قَالَتَا إِنْ كَانَ رَسُولُ اللَّهِ ﷺ لَيُصْبِحُ جُنُبًا مِنْ جِمَاعٍ غَيْرِ احْتِلاَمٍ فِي رَمَضَانَ ثُمَّ يَصُومُ