Postdoc dilemma: Top department vs. top researcher
Would you be publishing with that top researcher? If yes, you will probably produce more cited publications in better journals with better impact. Nobody cares about departments when it comes to publications, if there is a person whose name they recognize. Otherwise it is all about department, because as an average researcher you do not deserve a personal slot in anyone's mind. You will be assumed to be the mean of that department.

The effect is actually really small because academia is meritocracy. After you have merits you will be evaluated based on those. If I feel busy or lazy, I may skip a paper that does not look good after a quick eyeing if I do not see any seals of quality, such as a researcher I recognize or a department that has the good stuff on average. Also the top journals matter. So the point is that when you are under a rigorous evaluation for your future positions in Tenure Track, they will read you papers and make the decisions based on those. But you will have a slightly better metrics on those papers if you publish with a top researcher or you are from a top department, you might have a small advantage because people are slightly more likely to read your paper. But if you make it to the top journals or produce high quality publications it does not really matter.