Using the Universal Render Pipeline, I used a custom renderer which simply switched the rendering type of a certain layer to instead of rendering when there's nothing in front, to render when there is something in front. Here's the video of where I learned how to do it. Hopefully it comes in handy for your next game!