Sorry, but the Sea Harrier was no better than the F-35
It was slower and far more vulnerable with engines in that position. Good for CAS when air superiority has been already achieved by other planes, or when there's no serious air opposition, but a dangerous plane if air superiority has to be achieved - and in this case speed, armament and electronics matter a lot.
That said, the F-35 is still a "compromise" airplane born from the usual requirement "a single plane for every mission" which usually don't deliver good planes, especially if they have to be "cheap".