I haven’t used Discord in a while so YMMV but I used to use WebCord and screen sharing worked pretty well IIRC. It uses an up-to-date Electron version which has better support for modern desktop Linux protocols. There are probably plenty of other alternative clients that just repackage the web app with better Linux support. There’s also gtkcord4 which is a native Gtk client, though definitely not as polished as the official client.
RAR isn’t open source.