If you buy fixed income, there is a legal protection. But it depends on the exact investment
With bonds, there's a guarantee you'll get your money back
(But only with something like government bonds)
If the government can't / won't buy your bonds back, your currency will probably collapse in the process, so you'll have bigger problems, like all your money crumbling into dust
With private bonds, there may be an institution that guarantees that, but it depends on where the bond is from and where you're from
You'll have to read about what exactly you are buying
You guys might have noticed that the US is suffering from some heavy inflation, so the 20-year bonds rose from paying 2% per year to 5% per year
It seems small, but it's really something, considering the US debt is SO LARGE.