Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
If the wired headset is plugged into a simple 1/32-inch microphone-and-headphone jack, then some of those jacks are as they all used to be before some years ago: completely without any sensor that tells whether a device has been plugged into them or not.
This is not the case where a Bluetooth headset is concerned, nor where the phone itself being used is concerned.
So while I am not a thorough expert in Cyanogen OS, I suspect that the use of a wired headset comes with this inconvenience.
Make sure you are not hitting the Mute Mic button in your call dialer, when trying to hit the End Call button. I hear they are close together, though that may not be true.
However, Cyanogen OS is new to me. Snooping around through the settings might reveal something obscure in the way of a setting that deals with 'Mute Mic' or Mute Microphone etc. Esp. anything to do with Dialer, or the settings in the Dialer app.
Then it must be some sort of setting, and I'm sorry that I guessed wrong at first.
With apologies, I have Opted Out, opening the case to other Experts in this category.
(But, I still advise you to check the Settings in your dialer app.)