I had a similar issue, my computer suddenly constantly muted itself. Unmuted it and boom it muted again within a few minutes or seconds. Turned out, my oldish gaming keyboard was malfunctioning and caused it. Since replacing, its never happened again.
It might be a long shot, but don't rule out your keyboard.