Safari browser doesn't handle sound device selection menu properly when there is multiple devices available

So here is a bug I have faced

Here is my setup:
Mac mini
3,5mm jack has a headset with a microphone
USB port has a bluetooth receiver of a wireless headset

While my wireless headset is set as the main active headset in Mac and working fine normally, once i press the sound device selection from the microphone, the microphone selection defaults to the one being used in the 3,5mm jack, even if i didn’t change the device. Also additionally a strange thing is that the sound levels that are shown are all affected from the 3,5mm headsets microphone, even if the other microphone was attached to the system.