My Mac Switches Audio Output From Bluetooth Headphones to Internal Speakers
This kind of issue has been widely noticed after the major updates of macOS from Mojave to Catalina. I would suggest you get the latest Catalina update that has been released couple of days ago. 
In other hand, try the following two resolutions which might help you. 


Open Finder
Click on “Go”
Then go to “Folder” 
Type on the search tab ’ /Library/Preferences’
Look for a file with a filename “com.apple.Bluetooth.plist. 
Delete that file. Not to worry though as will auto-create a new copy of the Bluetooth file.
Once file is deleted, restart your Mac device.


PRAM or Parameter Random Accessory Memory that stores system settings on your Mac device such as settings on display, volume of your speakers, time zone settings and many others. Here’s how to reset PRAM on Mac: 


Shut down your Mac device.
Press the Power Button.
Before the grey screen appears, press the Command, Option, P, and R keys all at the same time.
Continues pressing the keys Mac restarts and a startup sound can be heard for the second time.  
Finally, release the Four (4) keys:  Command, Option, P, and R keys