The Messenger of Allah ﷺ did not forbid sharecropping, but rather instructed them to be considerate with one another.
حدثنا محمود بن غيلان أخبرنا الفضل بن موسى السيناني أخبرنا شريك عن شعبة عن عمرو بن دينار عن طاوس
أن رسول الله ﷺ لم يحرم المزارعة ولكن أمر أن يرفق بعضهم ببعض
Its chain is daif. Nasai also narrated it, 8/43, 44, no. 4806 (Qasamah, chapter on mentioning the categories of blood money for unintentional killing) from Ali bin Saeed, and Abu Dawud, no. 4545, and Ibn Majah, no. 2631, from the hadith of Hajjaj bin Artah with this same wording, and he is a mudallis and daif, and he narrated with "an" without specifying direct hearing. See Nayl Maqsud, no. 5441/1. On this subject there is also a narration from Abdullah bin Amr [to come, no. 1387].