I have the same problem, but in French. I found this : (I think in Sonoma you can type without disabling the microphone, so that's why it automatically changes the keyboard to the language in which you are dictating from). that's a pain because I'm using a American keyboard )
6. USE VOICE DICTATION AT THE SAME TIME AS THE KEYBOARD
macOS Sonoma introduces the capability to utilize voice dictation simultaneously with the keyboard, addressing a limitation that existed previously. Apple has reconfigured the voice dictation module, allowing you to use it alongside the keyboard as needed.
To enable voice dictation, access macOS System Settings, choose the Keyboard option in the left column, and at the bottom of the ensuing page, under the Dictation section, activate this feature.