I had the same issue recently, after using Audacity for ages without this problem. So I asked what I had been doing recently involving audio that I hadn’t done before. The only new thing was fiddling with Openshot Video Editor.
I closed Audacity and Openshot, reopened Audacity and voilà, Audacity is now back to normal!
As a double check, I started Openshot with Audacity already running. Nothing happens apparently, but if I try to change the output device in Audacity, it switches to hdmi no matter what I choose, and the application goes mad. I left it there, closed Openshot, went back to Audacity and, after a few seconds, all was back to normal.
Hope this may help to find and remove the problem.