.........not all designs were, in relative terms when entering/ in service, as role-flexible as the the Hunter (for example the F-4 was arguably even more flexible, but the Lightening was significantly less flexible) re: potential alternatives, and of the inevitable compromises involved. For example a close air support Lightening would likely have terrible range/ payload (fuel or bomb load? you can’t carry enough of either! Or both!), insufficient low altitude agility/ manoeuvrability for the role (just like most supersonic fighters of its era, including the F-4 as evidenced over Vietnam), insufficient systems to compensate (again fairly typical of 60’s supersonic fighters), much more expensive than simpler subsonic or less highly supersonic alternatives that are probably better at this role at this time, and more expensive than smaller supersonic alternatives that are about as good at the role at this time.
Now the actual real world replacements generally performed well in service so there’s no very clear “bullet” to dodge in that regard.