The above DPH code uses the string replaceAll method, so I am not certain why only one CRLF is changing.
As FYI, Filters execute in the order they are defined therefore, the save file filter will not have any LF changes applied -- in the event you are saving and checking the XML using the output of that filter.
Try running a test using the following and review the output in the log files.
Then, enclose a print out of the the response from the consumer application's log file:
import com.itko.lisa.remote.utils.XMLUtils;
// perform magic string replacement
String theBody = testExec.parseInState( lisa_vse_response.get(0).getBodyAsString() );
// remove the pretty print line breaks from the XML
theBody = XMLUtils.dirtify( theBody );
// change last CRLF to LF
theBody = theBody.replaceAll("\\r\\n", "\\n");
// put changes back into the body
lisa_vse_response.get(0).setBody( theBody );
// the log files will contain a single line display rather than pretty print XML
_logger.info("<<< your lisa_vse_response is: ");
_logger.info("{}", lisa_vse_response.get(0).getBodyAsString() );
_logger.info("<<< end of your response");
Remove the _logger.info lines before deploying the VSM into production. These are for debugging only.