They can also do it while you're abroad, and then it doesn't matter if the other country accepts you or not. The problem is wholly on your shoulders.
A notable case is Shamima Begum's: born in London, the UK deprived her of British citizenship, claiming that she anyhow had Bangladeshi citizenship (but she hasn't: the Government of Bangladesh said as much). Anyhow, since all of this time she has been in Syria, this is not really a problem for either the UK or Bangladesh.
A notable case is Shamima Begum's: born in London, the UK deprived her of British citizenship, claiming that she anyhow had Bangladeshi citizenship (but she hasn't: the Government of Bangladesh said as much). Anyhow, since all of this time she has been in Syria, this is not really a problem for either the UK or Bangladesh.