I believe I heard that the B2 is being phased out precisely because of what you pointed out: It is finnicky, difficult to maintain, and when one goes down it’s the equivalent of the loss of GDP of a small country.
If we don't fly them, then we lose everything invested in them, which is a lot more.