It would be pretty bizarre to refuse on principal to learn from experience. The F35 is expected to be in use through the 2060s. Part of the engineering challenge is designing around the fact that human pilots are expected to be phased out mid-lifecycle for these airframes.
Sharing with allies for cost and geopolitical reasons is good for the contractors designing and building th plane.
You spread around the tax dollars spent on jobs between many different US states and counties, and voila, immunity from politicians. Kick that up to a nation scale, and you really have something good going.
Taking advantage of people’s interest in only their immediate future and their immediate surroundings, and people’s willingness to ignore long term and worldwide costs is a path to success and a downside of “democracy”.
There are far better ways to advance geopolitical stability than a boondoggle of an aircraft project, especially when the military is already so far ahead of everyone else. However, this specifically results in lots of long term high paying defense contractor jobs in many congressional districts. We could have beefed up education, research, space exploration, energy efficiency improvements, mass transit, etc.
And the F35 was always going to be shared with allies for cost and geopolitical reasons so not sure how that can be considered a negative.
The US structured the F35 program to specifically avoid the F22 failures.