The US has over 10,000 military aircraft in service and thousands of spares sitting in storage. The US is quite arguably the only military that can casually absorb losses like these.
This specific aircraft is being phased out over the next several years. Assuming these still had some miles left on the airframe, they likely would have been put in cold storage a few years from now.
Do you have a source for the Growler being phased out? I was under the impression that they still have a long operating life ahead.
The 5th generation platforms can do the same mission with a lower risk profile using their built-in systems. The US Navy doesn't have enough of those so the F-18 Growlers are sticking around to fill the capability gap until the 6th generation platforms drop in the early 2030s to replace the remaining 4th generation gear.
That has been reported in a number of places and makes a lot of sense. The current order backlog for F-35s runs to almost 2030 despite production capacity upgrades. It is the same reason there are still many normal F-18s flying in the Navy even though the F-35 has existed for years.
The 6th generation platforms appear to be an upgrade super-cycle, replacing all of the remaining 4th generation platforms. The 5th generation platforms were in some respects prototypes of what they really wanted to build. The US Air Force has been making many moves in a similar direction. For example, the procurement numbers for the B-21 (a 6th generation platform) is larger than the number of airframes for any existing bomber and there are serious discussions to scale the production beyond the number of all existing bombers.
There is a lot of signal suggesting that the US military is moving to a pure 6th generation spine for its air capability over the next 5-10 years.