It would help to know which phone you're using since the location of the setting might vary, but there's usually a setting associated with Answering and Ending calls.
If you own a Samsung device, that is in the Accessibility section, under Interaction and Dexterity. You'll see an 'Answering and ending calls' option with a toggle for 'Answer automatically', which does what you describe: answer calls automatically when connected to BT.