I can't find any sources reporting Thomas was stripped of any medals. However, He did lose his legal battle to swim against female athletes in the Olympics. What leads me to believe this is a fake report is the claim that Riley Gaines was given the gold. I think she finished in 5th place in that races, not second. I could be wrong about that.
Thomas lost a legal arbitration case against the World Aquatics governing body which implemented a policy banning males who went through male puberty from participating in women's aquatic events. This is a rational policy because once through male puberty, the superior size and strength of a man becomes obvious and a major advantage competing in women's sports. At the same time the Aquatics governing body established an "open" category of competition in which transgender females, or males, can compete.
But the report that Thomas was stripped of medal is false.