I never saw the Messenger of Allah ﷺ pray facing a pillar, a stick, or a tree without placing it off to his right brow or his left brow. He never aligned himself directly in front of it.
حدثنا علي بن عياش حدثنا أبو عبيدة الوليد بن كامل من أهل حمص البجلي حدثني المهلب بن حجر البهراني
ما رأيت رسول الله ﷺ صلى إلى عمود ولا عود ولا شجرة إلا جعله على حاجبه الأيمن والأيسر ولا يصمد له صمدا
Its isnad is daif. Walid bin Kamil, Abu Ubayda Shami, has some weakness in him. Added to that is Walid bin Hajr Nahrani, who is of unknown status according to them. As for Ali bin Ayyash, he is trustworthy and firmly reliable. And Dubaa bint Miqdad is not unknown, her hadith appears in Muslim.The hadith was narrated by Abu Dawud, 1/185, no. 693, and Bayhaqi, 2/272, both in the chapter on prayer.