Heya,
AFAIK, MacOS doesn't have any built in configuration for this, so you'd have to install a third party tool like
https://github.com/deweller/switchaudio-osx (available through homebrew).
Once installed, you'd just run
Code:
SwitchAudioSource -t input -s "Built-in Microphone"
and it'd switch the audio input from the current source to built in mic.
To automate it fully, probably best to use launchctl to monitor the /Library/Preferences/com.apple.Bluetooth.plist file for changes and then run a script that checks if the current input device is your airpods and then if it is changes it to the internal mic. If you just wanted to have it actioned by a key combo or something, could use automator instead. OF course this doesn't solve the problem of when you connect to the device the audio input will be switched until the script runs to switch it back.
It shouldn't be too complicated, but I don't have time to do a test loop today unfortunately. If interested, or if nobody knows a better tool, I'll post up a plist & script tomorrow
All the best