And yet on every other OS, users can take screenshots and use virtual keyboards... It's not because X's security model is broken that the solution is 'we'll just remove that functionality'.
Wayland allows the same as well. It’s just an include/exclude list for such APIs, so you can actually limit which programs can access what.
Under X11, jailing GUI apps is entirely useless as there is no actual security boundary. Under wayland, you as user are in control and can define whether spectacle should be able to take screenshots (sure) and whether myflashlight-flatpak should be able to access all input events and take screenshots (probably not).