This is how it works now, Each controller can have "links" to WiFi Networks (multiples links in case the 5GHz and 2.4GHz have different names/ssid). UDM will only attempt a local connection when on the "linked" network. Each controller's WiFi links are unique to the controller, but can be shared with other controllers, so you only have to define the network one time if you have multiple controllers on the same network.
Issue can arise if both the homes/locations have the same WiFi Network Name (which I have encountered once), but this is rare and, in my opinion, not good practice on the user's end. Android allowed us to read the BSSID(UUID) of the network but iOS does not (gives a faux BSSID) so if this issue arises the user will need to name the WiFi networks differently or use UDM's the automatic detection with a hard coded numerical IP Address for the local connection and the numerical IPs must be different.