As someone who has done both, this is the answer. High level sprinters intentionally put on some muscle mass, high level distance runners will intentionally keep their weight below a certain level. Running distance isn’t going to make you lose muscle, and sprinting isn’t going to help you gain it. (Some exceptions if you’re an elite level athlete)