How to find pixels which are getting occluded in the next frame?
Please see the panel ... object relations pass index. This information can be examined in the compositor.  This is generated in the object index render pass for Cycles. You must enable that pass.



There is also Cryptomatte.