The F-4 was built for the Navy and the other services saw what a great plane it was and bought in.
The F-35 is intended as a lightweight multi role aircraft, so it’s full of compromises already.
The F-111A/B as a shared USAF/USN aircraft is much harder as there’s not as much margin for compromise in something that is supposed to be the pinnacle of current performance.
There is a very long list of could-have-been multi-service aircraft, though. If you look at the number of ground-based operators of the F-18, clearly the USAF could have been satisfied with it as well. The USN probably could have been satisfied by a navalized F-22 derivative (the story of 1990s/early 2000s procurement is complicated), the USMC definitely could have been satisfied by a navalized AH-64 rather than developing the AH-1Z, etc.
The services are just very resistant to ever needing to compromise on procurement issues unless Congress and the DoD make it clear that they have to. The USN feels their needs are special, and that the USAF would dominate any shared procurement and force them to compromise too much, while the USAF feels like every pound added for carrier operation is a direct affront. Neither view is entirely wrong - the development delays and compromises of a navalized platform like the Dassault Rafale are another good example of the costs of shared development - but the simple reality of modern aircraft development costs and defense budgets means joint platforms are here to stay.
I'm not sure that the F-22 would have ever worked for the USN either. I think that its stealth coating are just too fragile for a marine environment. And the USMC could never afford the AH-64.
The NATF program probably would have worked out fine, albeit expensively. There has always been speculation that part of the selection of the F-22 over the F-23 was because the F-22 was considered more suitable for a navalized version - and the comparatively small design differences between the F-35A and F-35C designed later by the same group suggest that a similar amount of work would have been involved in navalizing the F-22. Coatings would have been an issue in the 90s, but would largely have been solved by an realistic service entry date in the late 2000s. What killed the NATF was post-cold war budget reductions and shortsighted policymakers, not technical challenges.
The story of a navalized AH-64 is an equally strange saga. To hear the USN and USMC tell it, you would think it impossible to operate the AH-64 from a ship, yet the RN has done so extensively with relatively minimal modifications to the airframe. Given the small production run of the AH-1Z/UH-1Y program, it's questionable if much was saved. Certainly if you look at foreign customers, the capability/price of the AH-64 has been much more appealing than the AH-1Z.