How to make lines in math blocks have equal height?

I am writing code in math blocks. Parentheses make lines higher. How to fix this? Here is my typst code

#block(inset: (left: 2em), align(left, [$
& "cost" :: "Tree Int" -> "Int"  \
& #block[$
& "cost" ("Leaf" x)     & & = x \
& "cost" ("Node" u" "v) & & = 1 + max" "("cost" u)" "("cost" v) \
$]
$]))

Here is the result