xdg-desktop-portals isn’t perfect on Gnome and in my testing it almost always captures frames below 60 FPS. On KDE it’s fine though.
On some hardware, this does provide the ability to access the frame buffer at its frame rate. Though, in the past, I’ve seen KDE developers claim this is an unreliable hack (that shouldn’t be a preference) and will often produce garbage data and artifacts. (with the recommendation to use the portal instead)
edit: Expanding on this topic.
xdg-desktop-portals often supports DmaBuffers on popular desktop envrionments. These buffers are access to frames that are stored on the GPU. The portal itself connects to pipewire streams. The developer of the recorder can choose to save frames however they desire. As an example, they could keep the data on the GPU and use a GPU specific video encoder, or they could copy the buffer from the GPU to CPU memory and save each frame as a lossless image like a PNG.
The GPU recorder in the example skips the xdg-desktop-portals when necessary, it uses a GPU encoder, and it will use raw access to the frame buffer when necessary. All of this to record at (or closer to) the rendering rate.