You become stateless, and it’s a legal nightmare. Most countries won’t deport you, because they have nowhere to deport you to. But some countries like Australia will detain you until you get citizenship elsewhere. Sort of a catch-22, where you need to apply for citizenship to get out of prison, but can’t because no country wants to grant you citizenship because you’re in prison. The act of being stateless in itself isn’t a crime, but living somewhere without a visa is, and some countries (like Australia) don’t automatically grant visas to stateless people without some other reason like a refugee application.
Prior to the 60’s, it used to be much more common, because most countries use a legal concept called Jus Sanguinis, which basically means that citizenship gets passed from parents to children via birth. America, on the other hand, uses something called Jus Soli, which grants citizenship based on you being born in the country. But if the parents aren’t eligible to pass their citizenship on and the country they’re in doesn’t practice Jus Soli, then the child would be stateless. Back in the 60’s, most Jus Sanguinis countries agreed at a convention to provide emergency citizenship to individuals who would otherwise be born stateless.
These days, the largest causes are typically financial/records keeping issues in third world countries, or are due to politics like you’re describing. In the former, imagine a Jus Sanguinis country where you need to prove who your parents are. But they don’t have copies of their birth certificates or your birth certificate, and you don’t have money to get new ones. There’s also an administrative fee when you try to file the paperwork, and you can’t afford it. In the latter, it’s often due to good old fashioned racism. Certain ethnic groups being denied citizenship (like the Uyghur Muslims in China, or the Koreans in Japan following world war 2.) It’s also commonly due to authoritarian governments stripping citizenship for arbitrary reasons like you’ve mentioned. Russia isn’t the first to strip citizenship; It’s also common in parts of the Middle East.