M1 MBP's only come with two prong chargers, except in markets that use the British plug. Depending on the cause of the issue grounding could help, but you'd have to buy an extension cord with a ground.
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.