Using the manifest file (app.manifest in a Visual C # project) resolved this issue for me. For instance:
<asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <dpiAware>true</dpiAware> </asmv3:windowsSettings>
Of course, this should be inside your main build section.
PS I checked this when debugging GitExtensions.
PPS I understand that the question is old, but maybe someone still needs information.
Update: however, this can lead to automatic unwanted resizing of components in the form of a window.
Empus source share