It was likely a mistake to base a multi role fighter on a design aimed primarily the first strike role that were the first of the airfoces roles to be handed over to robots(cruise missiles), and it was most definitely a mistake to pick the one role where manned planes are least likely to be replaced by drones as the lowest priority roles.
The problem with the F-35 is that it's good at low level first strike missions and bad at visual range fighting weather it's dogfighting or close air support as it's what had to be sacrificed to make radar stealth possible, despite the fact that those are the primary roles where you cannot replace the pilot with a smart missile or drone.
And all of this in a plane that have the same crucial weakness that got the F-22 canceled, in that it's too expensive to build in number and requires way to much maintenance to fly as often as some of the less sophisticated airframes that can be pressed into service and do as good a job as the F-35 in the primary roles where you need to keep pilots in the battle space for prolonged periods, at a far lower pr hour cost.
In a lot of ways the US air-force is setting itself off for the same kind of failure as the luftwaffe had doing WWII where their advanced planes was bombed out of existence without ever getting in the air because, cost and maintenance issues prevented them from being in a constant state of in-air rotation.