First of all, it sounds like the phone never successfully connected to your neighbor's TV, so this discussion is all pretty much irrelevant. But if you had actually connected and were screen mirroring (which would mean connecting to your neighbor's wi-fi network, having your neighbor actually cooperate and set the TV to accept the screen mirroring request, etc.), then turning off wireless display on your phone would simply dump the TV back either to a black screen or its normal TV input.
I do not share a same WiFi with my neighbor my WiFi and his WiFi were different.
This is what happens when I try to connect (i tried to connect repeatedly just to make sure what I'm seeing is correct)
↓ This what happend when I connect to Samsung 4 series ↓
Samsung tv did appear ONLY if I turned ON the Wireless display, if I turned it off then the Samsung tv disappear from the list
And the notification never appeared
↓ This is the pattern ↓
Wireless display -> on -> I tap the tv that were on the device list -> I stuck on "connecting" (There is no prompt appeared when I clicked that tv, I don't know why (this is recording/cast prompt it usually contains a warning signs ,on the bottom right it has cancel / start button. But that prompt did not appear) and also there is no notification appear like what B. diddy said) -> I tap the tv on the list again (prompt appeared and it only contains the tv name and a "disconnect button" At the bottom right) (why do I need to disconnect? It's because I'm not sure what just happened, and it stuck at "connecting" So I just do it to make sure) -> i clicked "disconnect" (but I'm not sure if it's truly disconnected because it never become "connected" in the first place because it stuck on "connecting")
If I leave it on the connecting state
I think the list is just some sort of refreshed automatically and the "connecting" State goes away , (it just goes back to the first step where I need to select which tv I want to connect to)
But after that. If I tried to connect to that tv again, it just went bugged (?). When I tap the tv on the list, it just blinking. I tried to spam it, nothing happens, no prompt, no notification, just nothing happends.
The only way to fix the "bug" Things (I don't know what it's called) I had to restart my phone, and then everything went normal again