Orthographic screen capture as a mask for Perspective camera

I followed this tutorial to create a cone of vision mechanic for my top-down experiment inspired by Darkwood game.
The technique there is that ScreenCaptureComponent2D captures the dynamic mesh constructed from line trace data, writes it down to a texture, and then that texture is used as a mask for a post-process material.

But when I use Perspective camera with that post-process, I get those weird results.
PerspectiveCam

I also used the same mask for the Opacity in a material, you can see the plane the character stands on has that material and the opacity mask works correct there, but it’s broken when used in post-process.

Only if I switch to Orthographic camera, it works as expected. But this camera doesn’t work for my project, I really need perspective cam here.
OrthographicCam

Here’s the material function I use for the mask. Again, it’s the same for the post-process and for the opacity of the material under the character.

I’m not good at rendering stuff, and this issue blocks me now.
I’m not quite sure if I made some mistake here or is it just how it works in the engine.

Any tips are appreciated!