Works fine with OBS Studio (Flathub) for example.
Add a "Screen Capture (PipeWire)" source and a window should pop up asking for which screen or application window you want to capture.
Works with KDE and GNOME, not sure about other desktop environments.