Neighbor's Airplay device is sometimes visible in Airplay menu

Airplay devices can be discovered in two ways:

The most obvious is using Bonjour on the local network, you're connected to. It is basically a kind of broadcast DNS lookup that allows devices on the same local network to find each other.

The not-so-obvious method, which is what you're experiencing, is through peer-to-peer Airplay. This works by devices discovery through low-energy Bluetooth. If you choose to connect to such a device, the devices communicate through Bluetooth to setup a direct device-to-device WiFi connection. This type of connection does not use your local access point / router or your internet connection - it is direct communication between the two units.

It is fully possible that the signal conditions are so that you can discover the device through Bluetooth, but it is not possible to get a good enough signal to establish the device-to-device WiFi link.