I don’t think any of the surplus social security funds are invested. They have been spent, every dime of them. The social security account has IOU’s from the US Treasury in the form of Treasury bonds. Those surplus funds can not be cashed in from outside banks or other sovereign countries because that is not where they are invested. They have been spent all in the general budget.
By law the excess funds have to be used to purchase special issue treasuries which are not negotiable. They are not part of the general fund. They can only be redeemed to use for Social Security payments. When cashed they lower the national debt.
This is held as part of intergovernmental debt. Meanwhile Congress has been busy spending money and the Treasury has been busy printing money and borrowing money from other countries to pay for the spending.
It's kinda like saving $6000 a year in a savings account, but charging 60,000 on a bunch of credit cards for years and years. The money is still there in the account, but your net worth will eventually be negative, your ability to pay the bills will run out, and a bankruptcy court will take your savings to help pay your debt.