Zend certified PHP/Magento developer

Phantom jack detected in front panel

On my PC, dual boot (Windows, Linux) I have an annoying problem: from time to time (like every 15 seconds) my system(both windows, and Manjaro) detect the insertion of jack in the front panel. It also happened on my previous PC, always dual boot but with Ubuntu. This is quite annoying since if I don’t disable jack detection(in windows with realtek drivers, and on Linux with some magic), the sound stop playing for a millisecond(because it switches from headphones to speaker).

I can’t understand if a hardware problem (because it happens on both OSes) or it’s a software problem since it happen because it’s a dual boot system(https://www.reddit.com/r/linux/comments/1dydtz/linuxwindows_dual_boot_audio_problem/).

The problem get even worse on Linux if I do a reboot of windows instead of a shut down the machine and boot with Linux.

https://askubuntu.com/questions/1058328/ubuntu-18-04-audio-problem

To be clear on both OS I found a way to mitigate the problem (no pop-up on windows for jack detection and audio interruption, and no audio interruption on Linux).
Uninstalling one of the Os is not an option, may I try to disconnect the front panel from the motherboard, but as I read on the link I posted seems to not work.

So any idea on what is happening???