Israel's attack on Iran using the F-35 proves it is a very effective, if expensive, weapon.
Better to have something even worse on paper that can actually fly and lock targets than an expensive paperweight.
I wonder how good it would still be when the enemy had resources and time to adapt in an ongoing conflict. In russia's war with ukraine, we saw tactics and tools quickly evolving.