cosmo-record has been updated and now downloads in source quality, no re-encoding whatsoever. you'll need to install a new module to use it:
pip install httpx "getstream[webrtc]==3.4.0"
there are probably some little bugs still lingering, but it's working pretty well for me so far.
https://codeberg.org/djvu/cosmo-util