Are you referring to the supreme court case? It wasn't Starmer, and it didn't gut trans rights; it said that it was legal to designate a space for biological women. Maybe there's something I forgot about though. I don't think this is making him unpopular though, as Starmer's views on the issue are pretty mainstream.
Just to speak on this point. Regardless of what the intent of the supreme court ruling is said to be, it has resulted in many trans people being kicked out of sports teams, forced to out themselves at work and banned from toilets alongside increased harassment. So it has resulted in a very real loss of rights for trans people. And even though it is technical not Starmer's ruling, he had done nothing to push back against it or even criticise it.
That is not even mentioning Wes Streeting making the conservative's temp ban on puberty blockers permanent and therefore banning health care for all trans kids under 18. Also the introduction of new guidance discouraging schools from teaching about trans issues - effectively a new section 28 for trans people. The online safety act has also made it more difficult to access LGBT resources and communities. Its not an exaggeration to say that this labour government has been the worst for trans people in 30+ years.
I don't know how much this has affected Starmer's popularity, but anyone who is LGBT or an ally will be majorly put off, and thats not an insignificant fraction of the population.
Here's the wikipedia page for the theory, which makes for a pretty cool read: https://en.wikipedia.org/wiki/Giant-impact_hypothesis
Some cool stuff: