In the UK mobile networks are required to offer number portability[1].
I don't know if that means a mobile network can take your number away, but just like managing the registrar on a domain, you can manage the portability of your number.
[1] https://www.ofcom.org.uk/phones-telecoms-and-internet/inform...