وَعَنْ جَابِرٍ قَالَ: كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا أَرَادَ الْبَرَازَ انْطَلَقَ حَتَّى لَا يرَاهُ أحد. رَوَاهُ أَبُو دَاوُد
Jabir said that when the Prophet (ﷺ) wished to relieve himself he went off where no one could see him. Abu Dawud transmitted it.
Grade (as given by the source): الألباني: صَحِيح