No works because the objects to hide are the same ones that blocks the line of sight so never is visible , i don't know if i'm explaining well.
For line of sight you set wich objects acts as "block" and the box is a sprite that have to block and one that have to be hidden.
Also even if there is someway to fix that no matters because, what happens when the shadows have to hide some part of the sprite? With line of sight the sprite is visible or not, in the example will be ok, but if the shadows only gets half of the box will appear entirely so still not will be 100% correct. :S .