sometimes when I was near the edge but still in the shadows my attacks would work which made the mechanic feel a bit off
The issue may be that the shadow "checks" the light condition so it sometimes may work when you are in darkness but your attack isn't.