Mouse Cursor Escapes Viewport (after making cursor visible and clicked)

Hello,
So I’m trying to get a drag&drop inventory to work with my game and I noticed that when I make the inventory widget visible the cursor is made visible and is locked to the viewport
but if I click anywhere then the cursor can escape the viewport(game window).

I have been looking around for a Blueprint/UMG solution to this and have yet to find one so I was wondering if anyone has gotten this to work?
Any help in getting this to work would be greatly appreciated.

Kind Regards,
Bonny