If i create a widget containing a button and add it to the viewport and use the function “GetMousePositionScaledByDPI” to get the location of the mouse, the functions stop recording the new location if i press and hold the widget button with the left mouse button and move the mouse.
It will start to return the correct position whenever i release the mouse button.
After doing a bit of digging I found that this issue has already been reported to the developers. This appears to be the intended functionality. However, ways to possibly avoid this behavior would be to make it so that the widget does not capture the mouse. You could change the button click behavior to “precise click” or “on down”. I hope that this information helps.