I've had the same issue on my M1 MBA from day 1 bought it on May 25 2021.
At the time didn't know where the sound was coming from, I thought the speakers were faulty.
I took it to Apple Authorised Service Provider (AASP), they ran their diagnostics and concluded that all HW is good yet replaced both my speakers.
The issue wasn't fixed.
I was told that that was all AASP could do for me even though the issue persisted.
I had to contact Apple customer support (ACS) and explain the situation. they ran all the software checks and concluded that it was a HW problem. by that point I figured out that the keyboard keys were vibrating when certain frequencies of sound were played i.e 500 - 650 hz. They advised to go to AASP to drop the laptop for service. (there is this YouTube video which plays all frequencies of the audio spectrum https://www.youtube.com/watch?v=qNf9nzvnd1k)
Now I had proof to show AASP. I demo-ed the issue and submitted my laptop.
After some and forth interaction with ACS and AASP they finally agreed to perform a top case replacement which includes the keyboard and the aluminium frame surrounding it.
The issue was still not resolved.
By this point it has 2.5 months and 5 trips to the service centre since my discussion with apple started about this problem.
Do note that until this point AASP did not admit that this was a full blown problem, i.e I had to tell them and show them that this is how to reproduce it and this is when it occurs, it was basically me pushing them rather than them taking it forward by themselves.
So basically all the resources at ACS and AASP were exhausted and no one knows how to proceed since India doesn't have an easy replacement policy for in-warranty Macs though ACS and AASP knows the issue exists.
I spoke to ACS and told them that the issue was still present even after changing all the relevant HW. ( I didn't know what to do cause AASP didn't take much responsibility on the issue. Basically ACS forced AASP to take my laptop back into service)
At this visit was the time that they admitted that the issue exists on some M1 MBA's and does not on some other M1 MBA's and that they do not know the reason why it happens on some. "All the relevant HW has been changed and that we think it is not a HW issue, so please wait for macOS Monterey and check if the issue still persists if it does please come back to us then", was the reply I got. and I had to take it back.
I spoke to ACS and told them what AASP told me. ACS told me that this is not a SW problem and only a HW problem.
So basically SW guys point fingers at HW guys and HW guys point fingers at SW, pathetic situation in India.
ACS told me that they would escalate this case to a replacement or refund since this issue is not solvable and if replacement/refund is not possible they would look into what else could be done. (this should've happened much much earlier). I will try to post updates if I have any after today.
ACS case no: 101436458375
AASP Planetcare Visit 1 Reference ID: DPUDNIJUG3TS
AASP Planetcare Visit 2 Reference ID: WDBGDMZUVBST
AASP Planetcare Visit 3 Reference ID: D83UM7NQ0D1S
So if anyone has the same issue you could probably use the information above to speed up your repair process.