The distance doesn't contribute, because the thing you're looking at is so far away.
If you were to draw light rays coming to your eye from the edges of an object, you'd get something like this:
View attachment 90551
If you place an object between the source and the observer, how much light reaches the observer will depend on the proportion of the distance between the two lines that the object obscures.
Now imagine the distance
d increases to an absurdly large value as compared to the size of the object being observed (here, ~1500 light-years vs 1.58 Sun radii). The angle alpha becomes very small, and the lines of light rays become indistinguishable from parallel on the scale of a stellar system. So whether the object is 1 AU or 1 ly from the star, the distance between the lines of light rays is practically unchanged, and the same amount of light gets blocked.