Set object scale to the edges of the screen

I’m building a 2d platformer. I’ve created an offscreen indicator system that works using a box object that is set nearly to the edge of the screen, and when a actor leaves the screen a trace from the center of the screen to the actor, and hits that box and can calculate where to put the offscreen indicator from that hit location. I hope that makes sense? I’m currently using “Get Viewport Size” and multiplying it until the box’s scale reaches the correct location.

The problem is that if the resolution size changes or the camera FOV changes the scale of the box doesnt scale with it. Any ideas how I can get that box to scale correctly as the viewport changes?