The most popular candidate with the party members was Kemi Badenoch, a black woman, so it doesn’t seem credible that people voted against Rishi Sunak mostly because of race.
If that is not racism, I don't know what it is.
Rishi Sunak was claiming to be resident in the US while Chancellor of the Exchequer, while his wife was claiming non dom status to avoid paying tax. He was also hated by the supporters of the previous PM because he wielded the knife.
It’s not a shock that elections are not won on competence.
(tbh I didn't see much indication she was the 'most popular', but there were definitely plenty of members of the party receptive to her message, doubtless including many of those most likely to espouse racist sentiments)