Widget only shows when looking at object with the camera

I’ve followed a tutorial to set up an interact interface.

In the video the author chose to only have a certain widget show up when you’re pointing the camera directly at an object in the scene. This is not how I want it because it’s very dodgy, so I changed the sphere tracing to start from the character and used a custom channel, like I’ve seen in another tutorial. This works for interaction with the objects but the widget still only shows when looking directly at it with the camera. What determines this behaviour if it’s not the sphere tracing, and how do I set it up to show the widget when the tracing hits the object?

My trace function:

Set visibility as in the tutorial:

Edit: It seems to be the last part that causes this behaviour, because if I set the default opacity to 1, it behaves like I want it to. But I still don’t understand it.