She was easily winning polls of the members. The idea that conservatives are racist is a left wing slur, not reality. She lost because she is too conservative for the Tory MPs, who are well to the left of the party membership.
https://conservativehome.com/2022/07/16/our-next-tory-leader...