I was referring more that the player only hides when it’s in the shadow of few selected items, but doesn’t hide when behind the object itself (green zone is OK, red he sees you):

Maybe you can make the player be “behind” the book, moving the layer up on z-index, and make the safe zone be the object itself, and differentiate which object you can hide behind, and which is a platform like this:

Hope it helps with the images :)