The clue is the ".local" naming convention. This is related to mDNS/Bonjour. It appears that you are dealing with how macOS handles these protocols when running in a "mixed" networking (Ethernet / Wi-Fi) environment. macOS has a habit of auto-renaming the device's hostname when it sees a conflict between these types of connections.
Basically, when the Mac is on Wi-Fi only, it announces a single `.local` identity on the network, so AirPlay receivers are happy. The moment Ethernet comes online, macOS advertises a second interface with the same hostname. If something else on the wired network is holding that name—or if the Mac thinks it’s colliding—it adds a suffix like “MacBook-Pro-2.local,” and AirPlay breaks because the service announcement no longer matches what the receiver expects.
The best way to resolve this is to "lock down" the Mac's hostname so that it stops auto-changing. However, it is important that both network interfaces are on the same network subnet with no odd VLAN or isolation rules for this to work properly. Note that I'm assming that is the case here.
Here is what I would do in this case. I would start by fixing the Mac's hostname so that it stops renaming itself.
To do so:
- Open System Settings → General → Sharing
- At the bottom, change Local Hostname to something unique.
- Click Edit… next to Computer Name if needed and make it match. This forces a consistent `.local` identity across all interfaces.
Next, make sure Ethernet and Wi-Fi are in the same network. If Ethernet is on a different subnet, VLAN, or guest network, AirPlay often won’t work because Bonjour doesn’t route by default. In that case, Wi-Fi and the wired LAN need to be bridged or on the same L2 network so mDNS packets can see each other.
As mentioned by others, check the service order so macOS knows which interface to prefer. I suggest the following:
- Go to System Settings → Network
- Click the “…” menu → Set Service Order...
- Put Wi-Fi above Ethernet so AirPlay prefers the Wi-Fi interface for discovery, even if Ethernet is active. Alternatively, you can place Ethernet above Wi-Fi.
Next, double-check your Ethernet switch or router isn’t filtering mDNS. If this is a managed switch (Ubiquiti, UniFi, Aruba, etc.), confirm mDNS/Bonjour forwarding isn’t blocked. If Ethernet clients are isolated from Wi-Fi, AirPlay will fail immediately.
Finally, and optionally, reset mDNS on your Mac. To do so:
- Open Terminal and run: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Hopefully, this will resolve this issue for you.