works fine here using “Scene Depth” node:
Did you try playing with the addition threshold like I suggested? Even if you hooked it up backwards it should still work (just inverted white/black) if you indeed tried making it go negative. did you make it a scalar and try various values like I mentioned?
edit actually I just set up my example exactly like you had it set up and its working fine here.
try it in a new material. make sure its a post process type and applied as a blendable if not. Also probably a silly suggestion since you already had the lines working but also make sure custom depth rendering is enabled in project settings.