Genetically modified cells, tissues, and organs for treating or preventing diseases are disclosed. Also disclosed are methods of making the genetically modified cells and non-human animals. The genetic modification may include a nucleic acid that is transcribed as a human leukocyte antigen G (HLA-G) mRNA comprising a deletion in the 3 untranslated region, or a nucleic acid comprising a CD47 gene that is codon-optimized for expression in pig cells.