Does your charger have three prongs or two? Try grounding the laptop properly with three prongs.
Though I can't remember if it was my old Intel Mac, or one if the newer M1s. I haven't used the wired headphones lately.
I'll see if I can find them and report back here.
https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcSyVF...
https://www.apple.com/shop/product/MK122LL/A/power-adapter-e...
Edit: https://a.co/d/6yvKXPW
e. oh grounded short adapters. I wouldn't go for that due to the wall wort issue. I usually swapped out my apple bricks to grounded tails because it was usually easier to work into whateve ad-hoc power I encountered.