It's not obvious unless you read this entire page, but dx and dy are not pixel values when using MOUSEEVENTF_ABSOLUTE. To convert from pixels, do something like this:
dx = x * (65335/ScreenWidth)
dy = y * (65335/ScreenHeight)
This isn't mentioned in the description of dx, dy, or MOUSEEVENTF_ABSOLUTE.