Airplay break permanently when playing video in MPV/VLC

I have a Macbook Pro, using macOS 10.14.6.

Airplay mirroring works well in Chrome to watch Youtube videos, and also in Spotify for example.

However there is a problem when watching videos in the MPV player or in VLC. Whenever I use that player, the Airplay device disconnects, and from that point it’ll stay permanently disconnected. And it’s not just in the computer, even from my iPhone, the Airplay device stays broken, it’s simply not visible on the network!

The only way to fix it is to restart the Raspberry Pi, then it works again (until I start MPV / VLC again).