I have had this problem whee my microphone kept slowly lowering it’s volume. I have tried things from a lot of ubuntu threads but it turns out that Discord was the villain all along.

A lot of programs can do this automatically so it is important to disable it.

In your discord settings, open Voice & Video and scroll down to Voice Processing. At the bottom of this section there should be a toggle called Automatic Gain Control which you should disable.

Now there are also ways to do this on a global level, that no app can do this. But that didn’t work for my so far because I use PulseAudio and PipeWire at the same time. But I might wanna look into that again when another app hijacks my mic again.