You can’t interact with a widget with traces like that, they only respond to a cursor, I presume you don’t have a visible cursor in your game?
You get an error because you can’t cast an actor to a widget, since widgets don’t inherit from the actor class.
So to do this with a trace, you would need to manually put in collision boxes around the clickable buttons.
For example in this simple VR menu:
I added collision boxes around each button.
You then do your trace, but get Hit Component instead.
There’s a few ways of working out what has been clicked, when I done it, I used Get DisplayName, and an EndsWith node, you’ll notice my collisions were named with a suffix, which is the index of that button.
But you could also use tags, tag your collision box with either an index, or a string, use a ComponentHasTag node, or get tag node with a switch on string node for example.