Long story short, not really. You can eat protein all day long, if you’re not exercising correctly, you won’t build muscle.
Secondly, body weight has to do with eating above or below your caloric break even point. Eat lower calories, lose weight, be skinny. Eat more calories, gain weight, be fatter. Doesn’t really matter if more calories are coming from healthy sources or unhealthy (to an extent).
In certain circumstances, yes, macros matter, one clear example is if you were to be in a caloric deficit with one diet being high in protein vs another with super low protein, you’ll likely retain more muscle on the high protein diet giving you a different body composition than the low protein diet.