Similar Issue, but I suspect MindTheGapps or Lineage Update
My sons Pixel has similar issues. It started around August.
During Calls he could listen but the mic did not work. Then in Whatsapp and Youtube app videos would not play, while the same videos from youtube played fine in the Browser app.
Usually after restart it works until Spotify crashes the phone, or at least Spotify was active while the phone crashed. Why comes MindTheGapps with pre-installed Spotify anyway? After install from Playstore there are two versions on the phone.
Sometimes after a hard phone crash, mic and speaker work for a while, also a short time after factory reset (until Spotify, Youtube and Whatsapp are reconfigured), then mic and speaker stop to work again. Sometimes the Speaker works for a longer period but the mic does not.
Sometimes there is a message that the system process has stopped responding and if I want to stop it or wait. After the next phone crash this message disappears.
Its hard to believe that this is a hardware issue, while the phone falls into the manufacturing dates of the reported motherboard issues.
Next thing I am going to try is to use OpenGapps and if that does not help, revert to Stock ROM. Maybe this resolves the issue.
Thanks.