I think I found a solution. Since FormsEyeXHost is deprecated, and this object called SetProcessDpiAware(), we have to find another way to call it. Even though I’m running a Windows forms application, I called InitializeWpfAgent hoping it would call SetProcessDpiAware. It appears that it does and it works.
To fix the problem, just add this to your code: