Messenger of Allah ﷺ said, "If anyone of you goes to an open space for answering the call of nature he should neither face nor turn his back towards the Qibla; he should either face the east or the west." (Using translation from Bukhārī 144)
"إذا أتى أحدُكم الغائطَ فلا يستقبلْ القبلة، ولا يُوَلَّها ظهَرهُ، شرِّقُوا أو غَرِّبُوا" .