The A-10C is a terrible CAS platform these days thanks to MANPADs. The gun isn’t as accurate or effective as just firing a Maverick or dropping a JDAM/LGB, and those have the distinct advantage of being able to be done with seven or eight miles of vertical altitude between you and the target, rendering pretty much any surface threat completely meaningless.
The F-35’s sensor suite (and altitude) also provides an enormous advantage in situational awareness, which is probably the most important factor in combat operations.
As far as I am aware no A-10 has ever been lost to MANPADS or small-calibre fire. Instead several have returned to base with significant damage, exactly as intended with redundant systems.
The A-10 was designed to operate over Central Europe in the face of radar-laid 23mm guns and Gecko & Grail light SAMs. Its primary targets were in fact AAA, SAM vehicles and command tanks whilst CAS was secondary.
The A10 was designed solely as a tank killer, and was obsolete before it was fielded as the USSR upgraded their tank armor to defeat its gun.
It has never been able to operate in anything other than an environment where we enjoy complete air superiority and near complete ground control. It has never had AAA or SAMs, as targets -- it cannot operate in anything other than a completely permissive environment in that regard. This is not a mystery, it's well known. It was designed to strafe long lines of tanks, was never good at it, and has been obsolete since before it was fielded.