is it gonna be retired before it can justify the tremendous amount of money invested on it?
Although, to answer your original question, yes and no.
No groundbreaking invention ever makes its investment back. Air travel until the 60s was a rich mans dream. Concorde never turned a profit, Apollo certainly never did. Tesla balances precariously on success and bankruptcy, same with SpaceX (Elon once commented that the 2 best ways of wasting money these days were electric vehicles and rockets). But then to say they were wastes of money, misses the point.
Because the expense at the moment is the mountains of cash spent on R&D making them work. Stealth technology, supercruise engine designs, re-useable and autonomous rockets, efficient EV designs etc. But once the breakthrough comes, the R&D can be applied to other, similar designs for a fraction of the cost, and they will justify the tremendous expenditure.
The analogy I'll use is Formula One. I remember the phrase that it costs £100,000 (I use pounds as over 70% of F1 R&D is conducted in the UK) for every 0.001 second increase in speed in track. Which is a ridiculous expenditure.
Until the breakthrough comes. Disc brakes, independent suspension, KER systems, tyre compounds, crash safety and construction materials and techniques were all tested on tracks, in F1, before they arrived on production cars. And because the R&D had already been done under the most strenuous of environments, they didn't need testing, just applying.
So will Raptor earn its cash back on the battlefield?
No, not a chance.
Has it become the benchmark for every fighter since, with the lessons and tech applied onto things like the F-35, T-50, the Tempest and others to come?
Absolutely.
Also, think about it. Right now, the Raptor is
the fighter to beat. It's probably earned itself a place in military history solely on the fact that it was such a game changer that
everyone else had to stop whatever they were building and then have a long hard think about whether or not they could build something that could beat the damned thing in a fight, which is costing the Russians and the Chinese even more cash cos they're playing catch up and have been for nearly a decade.
There aren't many aircraft in history that can make that claim. Probably not since the arrival of the jet engine with the Me262 has that happened.
And if I'm honest, that's worth the cash.