Does the length of the text data affects the score of clustering
Yes, the length is very likely to influence any kind of similarity score. In general:


String containing very few words will have their highest similarity scores with other short strings with which they share one or two words in common. However if the words they contain are not common at all, they will have a lot of zero similarity scores (possibly only zeros).
Long strings (i.e. with many words) usually have low similarity scores, simply because they are unlikely to have a high proportion of their words in common. However compared to short strings they rarely have no word in common so they are much less likely to have lots of zero similarity scores.


As a result strings of similar length may tend to cluster together, depending on the data.