Mouse Position Is Wrong When Reparenting Window

Hi ,
I have set up an experiment comparing the same exact code, the only difference being in one case I launch my UE4 game as the process, and in the other case I launch MS Paint. MS Paint functions normally, and the UE4 game has the mouse pointer offset problem.