Thanks but did you tried change DPI or multi monitor when secondary is not locked or multi gpu???
i solved this problem some long time ago like this way:
UserInterface.cpp
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); // this is what we need add before ini and create window
PythonApplication.cpp
AdjustSize(m_pySystem.GetWidth(), m_pySystem.GetHeight());
if (Windowed)
{
RECT rcWorkArea{};
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, 0);
RECT rc{};
GetWindowRect(&rc);
int windowWidth = rc.right - rc.left;
int windowHeight = rc.bottom - rc.top;
int x = rcWorkArea.left + (rcWorkArea.right - rcWorkArea.left - windowWidth) / 2;
int y = rcWorkArea.top + (rcWorkArea.bottom - rcWorkArea.top - windowHeight) / 2;
SetWindowPos(GetWindowHandle(), NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
}
else
{
m_isWindowed = false;
SetPosition(0, 0);
}