Keep Widget Contained on to screen

I am creating a tower defense type game for the phone and have made this system to track where enemies are offscreen. Basically it creates a widget and that widget gets as close to the enemy in screen space as possible. This works well until I change the resolution to something larger and then the enemy indicator widgets go away from where the camera can see. Not technically offscreen but still I want to lock them to only the area the camera can see. I know the problem lies somewhere around the “get viewport size” Node but I cant for the life of me see a solution. Any help would be super appreciated. Thanks a lot!

Below is a video of the problem & a screenshot of the widget blueprint.

I think you are tackling this in a way more difficult than it has to be. I suggest you look here and see if this can help you on your way: Scale UI for Different Devices | Unreal Engine Documentation