How to rank search results of short string lists
Although i dont really know how a result is better. I guess what you are doing is fine (And perhaps the best possibly you can get). Just one note to be more precise, you should be ranking a node $u$ based on the size of the subtree rooted at $u$ (not on the number of leaves in that subtree, or children of $u$). This is better (and more general).

But one way to solve issues like this in general is to give score to each node in your tree (a weight). The higher the score, the more it will be ranked above. Then, you will be looking for the subtree with highest weights. You compute this by summing the weights of all nodes in a subtree. 

Example of weights (just to help you a bet): 


closeness to search term (use hamming distance for example, or other metrics [e.g. look how spelling suggestion algorithms work.]
If this is a website of recipes for example, the nodes may be recipes and the weight of a node is how many "likes" it received from the website. 


In conclusion, I guess what you are doing is the best approximation to have.  Adding the weights is a heuristic to give you perhaps better results.