most likely the reason is apple not providing the same access for 3rd party developers. Last year had similar idea to implement and there is not way to enable programmatically to have airpods mic as input and iphone speaker as output. Audio input/output routing on iOS overall is very limited comparing MacOS - similar if you want to use headset mic and phone speaker or vice versa.