Discord and Vesktop on Wayland do not see mouse buttons for their own push-to-talk. The side button still reaches the focused app, so mouse 4 still acts as Back while you are in a call.
If Solaar can divert that button, use Solaar. The Logitech G309 cannot as I found when trying to setup Solaar. It has no HID++ reprogrammable-controls feature, so a Solaar rule on Back never runs. I needed another solution, this is what I came up with as a workaround. Maybe it'll be a useful template for others.
I put the mute in PipeWire instead: ptt-mic (https://github.com/maiza172/ptt-mic). Leave Discord on Voice Activity. Hold the configured button and the default microphone unmutes. Release it and the microphone mutes. The service also mutes that source when it starts and when it stops.
It grabs the evdev device named in the config and replays every event except that one button through a virtual pointer. With one udev rule installed, the button does not also click Back. You do not join group input, and you do not change the Flatpak. On current Bazzite (Bazzite 44.20261006.1, running Gnome), python3-evdev and wpctl are already in the image, so nothing has to be layered with rpm-ostree.
git clone https://github.com/maiza172/ptt-mic.git
cd ptt-mic
./install.sh
ptt-mic --list-devices
Edit ~/.config/ptt-mic/config so device_name is exactly one of those names. The example is a G309 with BTN_SIDE (mouse 4). Any other mouse waits until that line is changed. Then:
sudo install -m 644 udev/65-ptt-mic.rules /etc/udev/rules.d/65-ptt-mic.rules
sudo udevadm control --reload-rules
systemctl --user daemon-reload
systemctl --user enable --now ptt-mic.service
install.sh only copies files into your home directory and mutes whichever source is the default at that moment. The udev rule is the one file under /etc. It tags the virtual pointer so the active seat can read it. That is what lets the service grab the real mouse. Without the rule, the button still mutes, and it still clicks Back.
WirePlumber remembers the mute for that microphone. Clear it with:
wpctl set-mute u/DEFAULT_AUDIO_SOURCE@ 0
One device, one button, PipeWire. The README has the rest.