'Was recently rendered' returning false results

Hello everyone,

I am using the ‘Was recently rendered’ node to figure out which objects are visible on the screen, but as you can see on the photo, it is returning objects which are behind the wall. As far as I know, these objects should be occluded by the wall and should not be rendered at all. Any idea why this might be happening?