A hybrid setup is where most people land after fighting this for a month, and it's not a defeat. Set the Mac and the iPad to When Last Connected, leave the iPhone on Automatically if you mostly listen there, or set every device to When Last Connected for total predictability. What you give up is the automatic hopping itself: they stay with whichever device last had them, and you move them manually from Control Center or the Bluetooth menu, which takes about three seconds once it's habit. Calls still behave well as long as the AirPods are on the phone when the phone rings; if they're parked on the Mac and a call comes in, you'll be tapping to bring them over rather than it happening for you.
Before conceding, two last things worth trying: make sure every device and the AirPods are on current firmware, since switching fixes do ride along with updates, and delete and re-pair once more after updating rather than before. If it's still 50/50 after that, the settings don't buy you reliability, so take the predictability. The reference for the options: https://support.apple.com/guide/airpods/dev228ba3df8/web