What headphones are you using? Have you tested with other headphones?
I have this problem, but only with a certain pair of headphones (Xiaomi Pistons 2.0). They seem to work randomly. Testing them right now, I plugged them in, unplugged, and re-plugged them 7 times, and they still didn't...