Opportunit cost? This assumes some kind of zero sum game, which the economy is most seriously not.
Total economic activity depends on several things, including calories available for workers to consume, and power production harnassed for work - whether that means harnassing animals to pull plows and till the land, or burning oil to power machines (purely physical factors).
But it also depends on psychological factors, look at the impact of the space program, or the fear of nuclear war. Some people got very angry about any construction work happening under the looming threat of nuclear war (in the early 50s) because all building was seen as pointless if it would just be destroyed. This kinds of psychological factors - when having an impact on a whole nation - can't help but impact productivity and total economic activity. The space program on ther other hand gave a nation, and perhaps even the world, hope. Inspired a generation to believe in the future and in advancing technology. Again these psychological factors drove the economy forward.
In more mundane examples, investor confidence directly affects stock market prices, housing prices, and decisions made by corporations. If there is no confidence that a corp can sell items at a price they can profit from, they may shutdown production. Examples pf the great depression and the 2008 financial crash are perfect ilustrations of the knock on effect of losing confidence in an economy.
So i believe the promise of a clean safe fusion dream could promote more economic activity than not doing so. The opportunity cost of not investing in such an ambitious project may be immeasurable. Specifically because other projects don't inspire people.
Nevermind the fact that governments don't overly care about opportunity costs. (Although the international team currently working on fusion in france - ITER - has a lot of investment from world governments - mostly european - i actually think they've put all their eggs in one basket, which is a risky approach. You can still invest with throwing all the money at one project).