This is a generic question involving a situation when the original citizenship is lost/renounced due to obtaining a citizenship of a different country (either due to one of the countries not allowing dual citizenship, or simply voluntarily).
What would normally happen to residency rights in the country where citizenship is lost? Are there examples where it is possible to retain a permanent right to reside? Or a temporary right to reside (being able to upgrade to a permanent one in the future)?
If this happens while you're in the country where you lost your citizenship, would you need to leave/be deported?