Inside KWindowConfig::restoreWindowSize const QRect desk = window->screen()->geometry(); always returns resolution of the most left screen (regardless whether it is primary and regardless of where the window actually appears). This seems to be the same bug as reported here: https://bugreports.qt.io/browse/QTBUG-50788 This have a nasty effect that when you open kf5 application it always has [a size it had last time when it was closed on most left screen]. Even if it is found out that this is a qt-bug workaround is probably possible, because the virtually same code inside KWindowConfig::saveWindowSize returns correct screen.
The bug is also reproducible on Wayland. Restoring last window size basically works only on the most left screen! I wonder how can anybody use kf5 applications on any setup where your most used screen is not on the left.
Since you've identified the code responsible, any chance you'd be interested in producing a patch? Here's the documentation: - https://community.kde.org/Get_Involved/development - https://community.kde.org/Infrastructure/Phabricator
*** This bug has been marked as a duplicate of bug 427875 ***