Shapeshifters are made out of omnicytes. 1 cell that performs all functions. Omnicytes would have to be synthetically made. Evolution does not matter because this would be a lifeform intentionally created by smart people.
The omnicytes have electroactive polymer muscles shaped like tendrils originating in the center of the spherical shell. These tendrils attach to the tendrils of other cells and attach in different ways for different effects. A highly ordered dense attachment acts as bone. A different ordering acts as muscle.
The cell membrane has a triple layer with the central layer being limpet teeth scales also known as goethite nanofibers in a protein matrix. A higher tensile strength then spidersilk, almost as strong as the strongest carbon fibers. It's hard enough to scrape stone which is what limpets use them for. Depending on the arrangements they can also have exceptional compressive strength.
Most biology is predominantly water. Have 1/3 the water and you get 3 times the density. Fat is low density. If a thick viscous fluid acts as energy storage and an oily thing for the cells to move around in, then most of the fat storage can be done away with further increasing density.
Hydrostatic skeletons in nature are not very strong, but artificially created ones can be very strong very stiff.
Instead of blood have a body wide lung to transport oxygen. A small lung thingy is still needed as a pump. Thingy is a very sophisticated technical term.
So the shapeshifter always has the same mass, minus eating and defecation. It just alters the density of it's body depending on cell arrangement. In the smaller form it would be stronger and tougher then in the larger form, but the larger form is more intimidating and with longer legs would be faster.
Basically it's biological utility fog. If you want it to be cybernetic stuff just do the same as above but have it be inorganic microbots instead of omnicytes.
Poop is waste. If it's intelligently designed then it should be able to digest everything completely with the only waste being CO2 water vapor and some salts.
The neural network should not be altered. Very short term memory using biological memristors will allow the shifter to temporarily break up it's brain to fit through a fence or a grate but must immediately reform. The blades of mercer are kind of realistic. Not as large, and not as strong, but definitely doable and practical against flesh. Still won't be taking on a tank though.
Btw distributed processing like octopus limbs would assist with changing and maintaining shape while preserving memories in the case of getting shot in the head or decapitated.
Super absorbent polymer with multiple thin layers of water can be used as an oil sweat thingy to be temporarily fireproof. A human can stick their hand in a blowtorch for about a minute with a thin layer of the oil because the water evaporates one layer at a time. A really cool material.
Should also be capable of photosynthesis but cannot survive off sunlight alone unless it's really lazy. There's a reason plants don't move.
Creating fire and flamethrower from the hands is also possible. High frequency radio waves can ionize the air to make a plasma flame discharge and ionic wind can direct that in afire stream. Alternatively use methane. Throwing lightning isn't realistic with using a pulsed laser to make a laser induced plasma channel which can be biologically done if the scientist's are clever, but it would probably be nonlethal.
Altering the shape of the tiny tendrils on the surface can be used for structural coloration for any color of the rainbow. It can be used to almost be invisible similar to an octopus.
Biological radar can be used for telepathy between members though not for ordinary people and can also assist infrared for really good night vision.
Spiders have trichobothria which are very tiny hairs sensitive enough to feel photon pressure,the frequency of light, and the mass of 10 hydrogen atoms.
Basically spider sense.
Should be able to bench press a metric ton. More with bones, but if one has solid bones then no shape shifting.
Due to every cell being identical they would have wolverine style regeneration, but only temporarily. Hundreds of bullets would damage an awful lot of cells, but they should only need about 1/10th of their mass to still be healthy in order to heal up the rest. Highly bullet resistant subdermal goethite scales would help, but in the real world there's no such thing as truly bulletproof.
Everything above is hard science. It's not hypothetical. It's not a maybe. Everything above is 100% possible if some clever people designed it. You don't have to take my word for it. Look it up. There is so much interesting info on stuff like this.
I thought this up as a way to have superpowered vampires using real physics with a reason to drink blood. Goethite is an iron compound and blood has an awful lot of iron in it. A 5'9 female body type vampire would weigh around 360 to 400 pounds just because of the density.
Final note. While the above can absorb biomass similar to mercer from prototype, the cell doubling time won't be any faster then 30 minutes and that's pushing it. That wouldn't be all the cells either. About 5% body mass at a time max due to thermal limitations. Some bacteria are faster but they are also far simpler.
This is the hard science answer of a 100% realistic synthetic biology shapeshifter that occasionally throws streams of fire and also occasionally shapeshifts into a demonic teddy bear to scare random people in the freezer section of Walmart.
Hope this helps.