from @ steadfasterX
well it is actually not a fix but a workaround. if the user has rooted the device it can be “fixed” by the user himself but afaik AXP.OS (Pro) is the only custom OS allowing to lock a rooted device.
the custom OS dev can implement the above workaround like this . you can also find 2 FP threads about that topic leading to the magisk workaround
i don’t know what to do with that, other than it should be integrate into /e/ build process :