While it is true that the illusion created by losing fat will most certainly make someone appear more muscular, I don’t see it as a simple one or the other pursuits. I’ve seen many people (clients of mine who get their bf calipered every week while dieting for example) lose considerable scale weight while increasing measurements of certain muscles (ie. arms), as well as people losing no scale weight for weeks on end, yet having their bf% go down by very large amounts. That says to me, that muscle is being built while fat is being lost.
Sure, it’s easier to gauge if you’re in a caloric surplus if the scale is constantly moving up, and as such, you can tell yourself with more certainty that you’re providing evnough quality nutrients (even if you’re not, because of poor timing, or simply bad food choices), but if you ask me, if you’re getting enough nutrients to address the building of new tissue, and you still have periods of the day, of the week etc, where you’re body gets to shift into more fat metabolism, you can easily build new muscle while simultaneously losing bodyfat.
For beginners though, I would certainly focus moreso on one task than the other, but never discounting that a little bit of fat loss, or new muscle synthesis can occur no matter your main pursuit.