I was having the same problem, but after some experimenting and using some ideas from this thread I seem to have fixed my issue.
It seems that while Microsoft have hidden the two profiles Windows 11 is actually doing a good job switching automatically, the problem on my setup was that Teams is not specifically listed on the permission list and is lumped in with the "Desktop Apps", as is the sound recording configuration tool.
So to fix my setup I used the Control Panel > Sound to set my headset as default communication device, then in Settings > Privacy & Security > Microphone I set the permission "Let desktop apps access your microphone" to true.
This allows Teams to use the microphone and it switches to the Hands-Free profile when the test call starts.
This unfortunately means that any app can use the microphone, and I found it annoying when running an app like a game that has voice capability Windows 11 switches to Hands-Free mode even though I am not using the voice system.
What I would like is for the permission list to not lump all apps together and list them all individually so I can choose which specific one gets to use it, similar to the app permissions on an android device.
Hope this helps some people.