The Messenger of Allah ﷺ ruled in favor of the right of pre-emption for the neighbor.
حدثنا عبد الرحمن أخبرنا سفيان عن منصور عن الحكم عمن
قضى رسول الله ﷺ بالجوار
No references are available.
Its isnad is daif, because of the anonymity of the man who heard from Ali and Ibn Masud. The wording of the hadith is general and abridged, and we do not know whether it means "he ruled by the right of the neighbor" or "he ruled by shufah for the neighbor." I did not find the hadith in the Musnad of Ibn Masud, nor anywhere else.