Audio messages not playing through Bluetooth devices

iOS & iPadOS

Hi all, since a pair of years ago I noticed one of my Bluetooth speakers wasn’t playing my WhatsApp audio messages through it, and the audio returned to my iPhone while doing so, and I supposed it was an issue of my speaker.
Yesterday I got a pair of airpods and the surprise was they also return the audio to my iPhone while playing the Skype audio messages I receive, even when this issue doesn’t occur with WhatsApp.

Is there a way to solve this problem? And does anybody knows why happens this?