Your comments

I think I found a fix: Using a script to turn on the depth buffer on the camera fixes the issue, although this fix seems to be incompatible with unity's new Post Processing Behaviour.