Imagine a certain group of intelligent species evolved the ability to edit their own RNA, manipulating the coding process to make proteins in their bodies. Why RNA you are forced to ask, well it's the middleman simple! actually think of it as a blueprint for zip made up the DNA. Alright never mind that, I am thinking of a special protein you can call it enzyme whatever which is similar to Cas9 that acts like a tiny pair of scissor to cut specific location in the genome but responses to the will of the host and then a new foreign blueprint is inserted to fill the gap and thereafter it is sent to mass production you get the picture. I am wondering how can this species make sure that enzyme do not cut at the wrong place and end up introducing undesirable mutation causing terrible sickness? Don't tell me survival of the fittest I mean come on there must be a more elegant and clever way around this, right?
A backup algorithm.
Just like in a computer system that has a backup algoirithm, to make sure everything remains consistent.
For simpler understanding, in database software, when a change is about to be made, it creates a backup of the original data, and then makes the change, if something goes wrong while making the change it reverts all the data to the original state.
These shapeshifters have similar inbuilt functionality, a group of specific backup cells makes sure to have a copy of original RNA or DNA with them, and if they detect a mal-functionality, they revert the changes to the original state.
Shapeshifters do get sick all the time.
You are right there is a risk of getting sick doing this. Shapeshifters who get sloppy with age or drink or haste do get sick. It can happen to careful shifters with a complex shift and sometimes can happen despite the skill and care of the shapeshifter.
Then it is damage control. If the damage just takes an organ like a lung or kidney out of commission they can deal with that and use their powers to heal and grow a new one. If the shift awakens a virus they can ride it out like infected things do. But sometimes the damage is a cancer and that is harder because to a greater or lesser degree the cancer cells escape control of the shape shifter. Sometimes the best a shapeshifter can do is contain the damage within the body. Many shapeshifters have one or more chronic cancers that they cope with on a long term basis.
Malignant subpopulations of cells which gain access to the shapeshifting mechanism are the most dangerous and these take on properties that cancers in ordinary organisms do not have. They can consume the organism like cancers usually do. Or they can commandeer the organism. Or they can break away in autonomous units and go off on their own, pursuing their own goals.
They've simply got more advanced technology than we do.
We have the technology to do just that. That's what gene therapy is all about (and specifically CRISPR gene editing). We don't use it ubiquitously yet because we have to improve on quality control and we need to make it cheaper. Your shapeshifters have already mastered the process, so they can grow a tentacle or a beak with over the counter meds and a bit of patience.
Think of it as a database update and apply basic data error prevention logic...
Master sequences... why not have the sequences check themselves against the master sequence before commit. Cascading in scope as each approved copy becomes a master. The master would have to be the arbiter of the final commit.
Checksums... the rna could have checksums, if it the code doesn't match the checksum, abort. Probably the method I would use, because it is self contained. A defective RNA strand will fail its own checksum, a defective checksum will invalidate its strand... either way the process stops.
Consensus... if after writing two (or three or ten) strands, if any strand doesn't match its siblings, abort them all and try again. Every member of a cluster has final commit responsibility for the other.
I was just thinking of the leftover mess when you shift (genetically) from person to puppy and shed 100 pounds of tissue that didn't match the select criteria.
Actually, in your body, it actually goes wrong times to times, and you don't get sick. why? first, your enzymes are right most of the times. when they are wrong most of the times it will end up in truncated transcript that will be removed by quality control (you ear weel you actually have quality control in your cells) or in the non-sense transcript.
If you believe it is a problem you may have your shapeshifter evolved to have a specific and better performing after editing quality control. maybe they develop a cellular organelle specifically on this purpose.
Even in the unlikely event of a single protein miss coded that transform a cells in cancer cells, your immune system is able to destroy it.