Not just locally on the device! There must be an error when calling or texting the number.
Data must work for internet for Signal, VoIP, etc.
This is for a UK PAYG SIM.
There should be no way for anyone to demand my number, or for me to leak it, or doing so should be irrelevant as it does not work.
The only way is a data only SIM card.
It won’t have a phone number for anyone to call or text.
Of course you can’t make calls or texts either. You have to setup some kind of SIP service if you need to.