the exact form is seeing that value as a number and may be adding the comma based on default handling of numbers. So that is either because it is a number field where comma's are turned on in the field settings, or because the data is spitting out as a number to the document.
You can create a formula text field that returns a text result of a numeric value. You probably can not have a formula numeric field that will allow you to use the totext function. However, you may use a formula text field that converts numbers into text using totext.
For example, a zip code in the US is made up of numbers. Boston has a zip code: 02110. If that was recognized as a number, it would show as 2110, droping the 0. However, if you use a text field, it understands that the first 0 is to be a text character and not treated as a number.
So my recommendation is to first, try looking at your field settings to see if the output is set to allow commas. If it is, turn that off. If that doesnt solve the problem, convert the field to a formula text field... that should work.