>This is because the Fed’s trillions of dollars of long-term investments yield 2% but cost 4.6% to finance.
This statement isn't exactly true because the cost to finance the purchases of Treasuries during quantitative easing was not 4.6% when the purchases were made.
They would be losing money only if they were now selling those Treasuries at market rate, but they aren't doing that - they're just letting them roll off the balance sheet as they reach maturity.