GUI frameworks should implement this, just like any app built on GTK, Qt, Iced or possibly others have native wayland support.
But yes I agree this is not a good situation. There should be something like “accessibility permission” on Android, where apps can basically read anything.