It would be good to know if you have tested and gotten the same result with multiple devices. I have run across numerous problems with Ubuntu and the driver selection in the past (they have gotten better recently) that creates a large number of wireless problems. However I will hope you did some basic troubleshooting and test with multiple devices before posting.
Not familiar with Ubiquiti products, but my first thought is that you have some sort of probe response threshold (PRT) setting misconfigured (vendors name this differently, so you may have to look for other settings).
Basically, the PRT is used in enterprise gear (Unifi is pitched as enterprise) where you will have a deployment of multiple APs to help ensure that clients pick the right AP to connect to and receive good service.
The way it works is that you set some sort of PRT (either in SNR or RSSI). When the stations send out a probe request, the AP will only respond if the signal from the station is better than the threshold set. This is helpful because the station will not be able to associate to an AP that is further away (because it doesn't respond) than a closer one that would provide better service. If the PRT is set too high in a one AP environment, you will get the behavior you indicated.
In your case, you still see the network from further out when not connected because you still see the beacon frames. When you go to establish the connection, if the PRT is set too high, you won't be able to connect from further out (where the signal is weaker) but connect just fine from closer in. Once the connection is established, the PRT is no longer in play and you can move further out.
Check to see if there is a PRT setting or similar and if there is either disable it or reduce the threshold.