This is the nuclear option. You must call your carrier. They can reset the Supplementary Services password on their end. This often triggers a new default password (usually 0000 again) which you must then change immediately.

The phone's native "Settings > Phone > Call Barring" menu is slowly becoming a legacy interface. In fact, on many carrier profiles, this menu doesn't even appear on the iPhone anymore because the carrier bundle disables it in favor of their app.