I never saw the Messenger of Allah ﷺ pray facing a stick, a pillar, or a tree without placing it to his right brow or his left. He never aligned it directly in front of him.
حدثنا محمود بن خالد الدمشقي حدثنا علي بن عياش حدثنا أبو عبيدة الوليد بن كامل عن المهلب بن حجر البهراني
ما رأيت رسول الله ﷺ يصلي إلى عود ولا عمود ولا شجرة إلا جعله على حاجبه الأيمن أو الأيسر ولا يصمد له صمدا
[Its isnad is daif] Ahmad narrated it: 4/6, from Ali bin Ayyash, through this chain. Dubaa is unknown, Muhallab is majhul (unidentified), and Walid bin Kamil is layyin al-hadith (of weak reliability in transmission), as stated in Taqrib.