SUMMARY Currently scaling for screen is decided by the kscreen on fly, which means, if you are starting wayland session for first time, briefly, kwin and plasma would have a "wrong" scaling until kded starts, and for some reason if kscreen kded is delayed, it will get stuck on wrong scaling randomly. This is very visible when starting session with the --lockscreen option on mobile session. Now there's two solution to this, 1) we pre-seed values for the kscreen configuration or kwin scaling configuration. This in theory is possible but quite hard given this config format uses the UUIDs and there's no way of knowing that and pre-setting this values using /etc/xdg or something like that. So only way right now is to let kscreen figure out correct scaling value and set it, in some cases this is too late and provides very in-consistent experience. 2) We evaluate kscreen scaling configuration before starting anything including lockscreen.
https://invent.kde.org/frameworks/kded/-/merge_requests/7 mentions issues with KScreen being loaded/applied too late in startup so maybe it would make sense to move that somewhere earlier in the startup chain instead of relying on kded
Pre-configurable scaling is now possible via https://invent.kde.org/plasma/kscreen/-/commit/8fbe7ceb1628839a4bb77a4a33c0f183b3d19047. The remaining part of this issue is a bug which is already tracked with Bug 433460. *** This bug has been marked as a duplicate of bug 433460 ***