Python: Dynamic Time Warping, what actually is a 'similarity score' and how to compute it?
You have got exactly what you requested in your code.

DTW is a similarity measure between time series. By default, tslearn
uses squared Euclidean distance as the base metric (I am citing the
documentation).

Another ground metric can be used, when specified in the code.
You use a default, i.e., Euclidean-distance metric, your sequences (time series), $s1$ and $s2$, are aligned $len(s1) = len(s2)$. The Euclidean distance is a square root of sum of squared differences of sequence items: $DTW_{Euclid}(s1,s2) = \sqrt{\sum_k(s1[k]-s2[k])^2}$. For identical sequences you have: $DTW_{Euclid}(s1,s1) = \sqrt{\sum_k(s1[k]-s1[k])^2} = 0$. The idea of similarity as the qualitative degree, when referring this Python ecosystem's feature, is supplanted by the concept of distance metric, although the word remains. You have no other choice as to accommodate yourself to this word usage.
This is how tslearn computes the &quot;similarity&quot; when you use a default metric. For other metrics and unaligned sequences, consult the documentation. The portal dsp.SE is ready to assist you in the case of uncertainty.