If we're discussing Bluetooth that is entirely on the manufacturer to make sure it is seen as an external device instead of headphones if your device is showing as an external device and you are still getting that message then it is a bug with your phone.
But anyway you look at it a head phone port was designed for headphones exclusively and using it in any other way is incorrect , we have a work around it's called line out and it should never go above line level line out is lower than a headphone port so the audio warning should not affect it at all if it does you are either not amplifying your audio correctly or the manufacturer made it incorrectly.
Me trying to come up with two insults.