The Star Trek transporter is not a suicide box.
One theory about how transporting might work is to scan every atom of the item to be transported, and then transmit that information elsewhere, and then re-create the object using that information. This is the idea that was used in that Christopher Nolan movie "The Prestige". It raises questions about whether an absolutely perfect copy of you is still you, and the problem of it creating two of you, requiring you to murder one of the two for the trick to work.
That's not how transporters in Star Trek work.
Transporters in Star Trek convert matter into energy (and Humans survive in this state as an energy being), push the energy to a new location (at speeds faster than Humans could endure), and then convert the energy back into matter. There's a reason why you can't beam through shields, even though you can send and receive transmissions through shields just fine. Because the transporter is not just transmitting information, it's moving large masses of energy around. And the energy being moved around isn't just generic "energy", the energy is a person. The transporter doesn't destroy/create matter, it transforms and relocates matter.
Replicators are different because while replicators and transporters both deal in matter/energy conversion, replicators are incredibly less complicated. Like, if you replicate a steak, they didn't just transport a steak and keep a copy of the pattern, so now the replicator can spit out endless steaks. Because the transporter pattern of a steak would be much too huge for permanent storage. What the replicator does is convert energy to create a shapeless blob of matter. It uses a designed recipe infuse the blob with vitamins and makes it edible and nutritional to eat. It uses a recipe to make the edible blob "steak flavored". It uses a recipe to shape the blob like play-doh. It uses a recipe to change the blob's firmness and texture. It uses a recipe to affect the blob's heat. It's 100% artificial food made using recipes that can be mixed and matched with other recipes to your heart's desire, while those recipes are tremendously less complicated than a living, breathing, Human individual. Really, the only thing transporters and replicators have in common is that they're both based on the same matter/energy conversion tech.
The transporter beam has been copied more than a few times, but that's more in the realm of "transporter accident" and not really something anyone seems to want to work on.
Regarding Data, Starfleet already had plenty of his schematics on file, so if he lost an arm or a leg, he/they could easily go up to a replicator or even a simple 3D printer and construct a new limb, but that's just his physical robot body. His robot body is the easy part, the positronic brain in his head is the hard part. Dr. Maddox wanted to disassemble it to try and figure out how it works (which would kill Data), and he was "reasonably confident" that he could put it back together again (effectively bringing Data back to life) after taking it apart and learning how it worked. But without taking Data's brain apart, even Data was unable to construct a stable positronic brain (see Data's daughter, who died after Data made the attempt). Which means that you can't just walk up to a replicator/3D printer and run off a working copy of Data's brain, since nobody but Dr. Soong has so far been able to assemble one. There is nobody able to give the replicator a program/recipe on how to successfully do that.
Incidentally, I'm 100% fine with that being the reason why "Synths" in this show have yellow eyes. They're copies of Data's robot body, which is the easy part. Their brains... well, that seemed like a reasonably good attempt, even if they did go crazy/get hacked and murder everyone.
Although the solution should really be to ignore positronic brains for now, keep the Data-inspired robot bodies, and work on miniaturizing a regular computer capable of running one of the Federation's many superior AI lifeforms. Even if you need to make the computer a backpack (like The Doctor's holo-novel negative vision of the cumbersome Mobile Emitter), you can still build a body for an AI and have artificial people running around. (Although Voyager already said that Borg tech is sufficient for loading an EMH program into a Human-sized body.)