Macbook pro 13 - Sound comes from speakers instead of headphones

Recently there appeared an issue when I plug my headphones into 3.5 output, the sound does not come from headphones instead it comes from the internal speakers.

The strangest thing is that Mac recognizes headphones when I plug them and changes the output in the settings automatically as it should, from speakers to headphones. But still for some reason sound comes from speakers.

I have also tried manually changing outputs, it seems to have no effect.

Mac OS 10.15.2


The problem was fixed by itself. Mac froze for some reason, I forced it to reboot, the problem was fixed.