Same thing happened with my 11 pro max just recently. All of the sudden the mic doesn’t work anymore during calls whenever on speaker as well video calls (facetime, viber, fb msgr, and whatsapp).
I’d tried all kinds of troubleshooting suggestions from apple support including updating to latest IOS 14.7.1. Still, doesn’t fix the issue. Video recordings (back and front) is working good however voice memo doesn’t.
I’ve reached out to MAC Service Center the other day and they’ve said that there are instances that it is brought by a software issue because, based on the facts I’ve stated to them, some functions are working well. If it is a software issue it can only be solved by updating the IOS or if it is in the latest version, wait for the next update to come out. If issue still persists after updating, that could be a hardware problem.
Most probably this is a software issue since the mic is working fine during ordinary calls.
I could not get an appointment in the service center as their servicing is always full during this pandemic. My phone is still under warranty until this October 2021. I hope apple will release another IOS update that’ll suppose to fix this problem and before the warranty period of my phone ends.