How long ago was this? Screen sharing[0] and capture[1] works fine in wlroots.
[0]: Supported with workarounds circa 2020, most were merged by 2022 - https://github.com/emersion/xdg-desktop-portal-wlr/wiki/Screencast-Compatibility
[1]: I've had success using `wf-recorder` https://github.com/ammen99/wf-recorder
I never thought it would take 3 decades for Wayland to be mature.