Mac ignores Headphones after sleep

I suppose your problem is similar to those described in this URL: https://discussions.apple.com/thread/5541299

So this issue has somewhat a long history, and my MacBook Pro 2019 model with macOS 10.15.3 has the same problem. In most cases, the way to trigger it is to make Mac sleep with headphones plugged in.

To solve this issue temporarily, my suggestion is to plug out your headphones and plug it in again whenever you encounter the issue, it works for me each time.

If you want to handle this problem in a more serious way, this thread in AskDifferent community may help you: Mavericks: No sound after sleep

Please notice, this problem may have something to do with a hidden flaw in macOS which hasn't be repaired over several major OS versions (this is purely personal guess), so on the Internet I haven't found an authentic answer for the reason and solution of this issue. Still, you may give the different methods a try and see if one of these solve your problem.