There are different ways like
If you're thinking in preserving white space i. e tabs, carriage returns and other formats then you can use the CDATA
Use an xslt transform. Doing it this way allows you to have control over the stripping or preservation of white spaces using xml:space Attribute.
The xml:space attribute is another standard mechanism that exists for preserving white space in XML applications. he xml:space behavior cascades to all descendant elements but can be turned off locally by setting the xml:space attribute to default. In order to use xml:space in a validating context, the attribute must be declared in a DTD or Schema attribute list for the elements in which it is used
So,Based on your comments, I think you may be able to use the XmlWriterSettings.NewLineHandling property to change how the text node handles the carriage returns. You'll have to experiment. I suspect the receiving application has some line parsing issue and is looking for a \r\n or something
Hope these are helpful for your requirement