You’re using the_field() for a field type that stores an array, which is automatically imploding the array with ', ' as a separator. You need to use get_feild() and do the imploding yourself, as well as the logic involved in testing to see if anything is returned.
To be honest, I didn’t know the the_field() and get_field() worked slightly differently until I saw your question. But then I thought about it because I know that multi select fields store arrays and since the_field() outputs the values of a field I decided to look at the function to see how it treats arrays. So I got to learn something. 🙂
Some fields store arrays, fields like checkboxes, multi select and others. When you use the_field() for fields that store arrays ACF converts the array to a string and puts a comma between each element. For these types of fields, it you want to format the values in some other way then you need to use get_field() and then loop through the array yourself. These concepts are all covered in the documentation for each type of field that needs special consideration, like checkboxes https://www.advancedcustomfields.com/resources/checkbox/