Are you sure you’ve not mixed up some different versions of the JUCE modules?
I’ll get this fixed, that bit of code needs to just be wrapped in a #if JUCE_WIN_PER_MONITOR_DPI_AWARE guard.
#if JUCE_WIN_PER_MONITOR_DPI_AWARE