Social security should be replaced with privately held accounts, just like superannuation in Australia. But in the transition people would need to be paid out their entitlement. So no problem there.
But if UBI replaced all normal welfare (excluding disability etc) is that such a bad thing? As long as the UBI is high enough and indexed to cost of living, welfare that’s broadly targeted at the poor should be unnecessary. Not just unnecessary, it tends to have the effect of making poverty stickier. Any time benefits are inversely tied to how well you're doing, you reduce the incentive to do better.