How to block raycasts by HUD?

Hi.
I have a raycast collision detector that works based on mouse position. As you see in the picture below i have convert mouse position to 3D world location and try to understand what object hitted by the mouse.

This functionality works great alone but when i add a widget to the viewport, objects behind the widget affected by the mouse. I didn’t know how to block mouse raycast within the HUD.
I have read [collision blog post][2] but i’m a bit confused because widgets has no collision components.
My widget seems like this:

Every solution has been appreciated warmly.

I dont think you can directly get widget under mouse cursor, but you can change current hovered widget in player controller or so, so you can check it and abort cast. If your cast happens on actor clicked you could just make widgets “block/consume” clicks.

Add a disable flag to the raycast logic, activate it when in fullscreen “HUD” mode.

How to do it? The HUD always render on screen. When OnBeginPlay fired it has been created and added it to the viewport.

I have wrapped my HUD with a border object and use OnMouseMove event to set a boolean variable to true. I check this value when i use LineTraceByChannel and refue the ray tracing. It seems good but a next problem is how to detect OnMouseNotMove! ?
I think i should create a new question for this. Am i right?