How do I allow the post processing effect "see through walls" on 2 overlapped meshes?

Hi,

Sorry to bother you again.
At first sight the material seemed to work, but now im noticing some “artifacts”, and sometimes the material fails to show the red part.
Can this be controlled or improved in the material?
Is the number 0.6 (magic number) what can maybe improve it?
I tried playing around with it, and sometimes it seems to improve but not in a reliable way because it then makes the sphere go red also when its in front of the cube.
Though this works as an overall solution.

T_Grimnir.rar (1.8 MB)


Dark Wall material:


Sphere sometimes rendering red when in front: