In a race, you might say, "Jane beat Kate by three steps."
To "have [somebody] by [a margin]" is colloquial to have defeated/beat [somebody] by [a margin].
It is grammatical to say "Jane had Kate by three steps," referring to a race. You might say, in reference to some time-sensitive contest, "They had me by just a moment."
If you say, "Jane had Kate by five pounds," it would be commonly understood to mean that Jane weighs five more (or fewer!) pounds than Kate, and your phrasing suggests a contest of something in which weight is important.
Clearly, the context is important. If Jane and Kate are wrestlers, the "contest" suggested implies that being heavier is more desired, and Jane weighs more. If Jane and Kate are models, the "contest" suggested implies that being lighter is desired, and Jane weighs less.
Or maybe it's something else. Maybe Jane and Kate are fishers, and they're trying to out-fish each other. In this case, Jane might have caught 5 more pounds of fish, or a fish 5 pounds heavier. Context is required to understand exactly the meaning.
So saying "of muscle" or leaving it off is important for the context, but it is not required by construction.
One more example: I play sports. It's very common to say "I had him by just an inch!" in reference to jumping for a ball. But I might have "had him by an inch", even though he "has a head on me!", meaning, in this case, that he is a full head taller than me. But he still can't jump as high. :)
It's a contextual construction.