Sun Beam works only when a camera is looking directly at the light source

Hi,

Recently been watching this tutorial how to post process light rays using the sun beam node:

Mimic Volumetric Fog Using Only Compositing (Blender Tutorial) - YouTube

Everything is good until you move your camera out of the light source (eg window is not in the seen), in this case the sun beam effect completely disappears, can you tell why?

Thanks

It is a 2D effect simulating render of 3D Volumes. But there is no 3D volume created.
Info is coming from image rendered.
That is an effect based on bright pixels of image.

If you move camera, those pixels may disappear from one frame to another. Then, the effect disappears, too.
If you move camera, you have to create a 3D effect to have it persistent.
Or you have to render a bigger image that keeps bright pixels in frame and then, crop it.

is there a chance that any pass data coming from environment will help picking up right pixels in the rendered image? what is a workaround?