Is there any way for my app to record audio during calls as well — or at least to prevent my microphone from being muted during calls?
Quoting the documentation, on Android 10 and higher:
Two ordinary apps can never capture audio at the same time.
At best, if you take over the foreground, your app can get microphone input, but then the other app (e.g., Discord) will not. That may not even work if the other app is "privacy-sensitive", and I expect that most of the apps that you cite qualify for that.