box-shadow paints relative to the border-box. Even for a shape with transparent gaps — a star, a donut — the box is still just a rectangle (or a rounded one), so the shadow comes out rectangular too.
filter: drop-shadow() instead reads the element's alpha channel and shapes the shadow to whatever pixels are actually opaque. It follows concave notches and holes exactly, and because it's a filter, it inherits any rotate/scale the element has — the shadow turns and resizes right along with it.
Compare the two stars in the demo: the box-shadow one leaks a rectangular shadow through the star's concave notches, while the drop-shadow one hugs the star outline precisely. The trade-off is cost — drop-shadow recomputes from the alpha mask, so it's heavier than box-shadow, and it has no inset or spread option. For a plain rectangular card, where the silhouette already is the box, box-shadow is cheaper and just as good.
When to use
Use drop-shadow for icons, logos, or anything whose silhouette differs from its box. Use box-shadow for cards/buttons where the silhouette already matches the box.