Make objects invisible when they go through shadow catcher?
If it is a plane...you can use this very simple basic setup: (thanks to vklidu for the modified version with more charm)

result:
https://youtu.be/TEEF467A4E0