Audacity records audio from my headset, even though 'Recording Device' is set to my laptop's microphone

I don’t know if it is a feature (i.e. something that is MEANT to happen) or if I’m doing something wrong, but it is kind of driving me nuts.
In the Device Toolbar, the recording device that is chosen is ‘Microphone (Realtek High Definition),’ which I am assuming is the microphone incorporated into my laptop. When I record something without a headset, it sounds swell, but if I happen to be using my headset (with microphone), the recording device apparently switches to the headset’s microphone, which dramatically changes the sound quality of the recording. The device listed in the Device Toolbar stays the same, no matter if I plug in my headset before or in the middle of recording.
If I plug in my headset whilst recording, the change in sound quality is clearly audible when I listen back to the track, even though, once again, the ‘Microphone (Realtek High Definition)’ REMAINS the chosen Device in the pertinent toolbar. I record layers of music, and therefore need to be able to hear previously recorded tracks while recording new ones, without the audio seeping into the new track - that’s why I’m using headphones. I would like the microphone from my laptop to record the sounds (as it is supposed to, since it’s the chosen recording device), regardless of whether a random headset with a microphone is plugged in or not. Is there a way to achieve that?

'Microphone (Realtek High Definition),

You may be suffering from Microsoft calling anything that records a “microphone.”

I think Realtek is actually your soundcard, literally a card with audio parts on it inside the computer, not the microphone. Normally, this card gets its audio from the built-in microphone, but when you plug in an external microphone, it (usually) mechanically switches out the built-in in favor of the external. All this is happening before the soundcard and is completely automatic. As far as the computer is concerned, nothing changed.

Now, had you plugged a USB microphone into the computer. Your Realtek would stay right where it is and you would need to dig in the Windows control panels and carefully, manually switch the sound system away from Realtek to the USB.

Maybe a headset with matching headphones and microphone is not a good choice for this job. Headphones would only ingage the playback side of the computer, not the microphone side. I’m guessing a bit here because they make different soundcard configuratrions. Many laptops have a “headset” connection on the side expecting both at once, always, forever. At one time there was a family feud about which plug configuration to use for the microphone. I don’t know who won because I started using Macs.

Koz

There is another variation here. If you have a USB audio device, you may be able to convince the machine to use that for playback instead of Realtek. It would leave the microphone right where it is.

For this example, that UCA202 can be playback or record and you can pick which one goes where. Of course with that, you may have timing, delay, or latency problems

Koz