There's probably a better way to do it but I think I have it working.
Go to Tasks tab > Add task > Bluetooth Connection > (Ignore output variables) > Under Action select "Disconnect" > Under Device select (Vehicle Name)
Done here
Go to Profiles tab > Add Profile > Select "State" > Select "BT Connected" > Under Name search for (earbud device name)
That's it. Profile should be active but if not toggle it on. I tested, put the earbuds on, went out to the car, turned it on. It disconnected from my earbuds for a second, saw the tasker lightning bolt in my status bar saying it had done its magic, and I hit the button on my earbuds and was back in business. It seems I can manually override by selecting Pixel 6 in my car as the media source but I'm guessing that would be music only at that point, and hitting the play button again on my buds switched it back to them.