No, those two methods give different results. The second method will give you the square root of the first method. Do you know the definition of the L2 norm of a vector? It is the traditional Euclidean length of the vector:
||v|| = \displaystyle \sqrt { \sum_{i = 1}^{n} v_i^2}
As to why they use the square in the triplet_loss case and the plain L2 norm in the verify case, I don’t know. I think it’s just a choice they have made.