DHCP failure when changing from one Wifi SSID to another

I have a large house and run two Draytek Vigor routers to provide full coverage. The 'main' router is a Draytek 2860n which has the VDSL connection to the internet. The second router is a Draytek Vigoer 2820n which has no WAN connections and just has its LAN connected to the 2860n's LAN side.

I have the routers' WiFi set up so they have different SSIDs. In general it all works fine, I can connect my laptop to either SSID as required.

The problem I have is when I move around the house. My laptop runs xubuntu 17.10 and uses Network Manager to handle the networking. So, say I'm connected to 2820n and move to the other side of the house where I need to connect to 2860n. I manually use the Network Manager applet to disconnect from 2820n and connect to 2860n. It appears to work fine and says I'm connected but most times that I do this the DHCP set-up fails. I have a connection but there is no default route and no DNS and the laptop has no IP address assigned (all IPV4 this). Sometimes it works OK and usually if I disconnect and wait a while (say a minute or two) and then reconnect it will work OK.

Can anyone suggest how to diagnose the problem, or a way of working around it? I'm quite happy to create a script that I need to run to swap SSIDs. I've tried restarting Network Manager but that doesn't help.

It seems as if dhclient is failing as if I run it manually when in the not working state it just hangs.

Oh, also relevant, DHCP/DNS is provided by a Raspberry Pi running dnsmasq. Everything is otherwise pretty standard, 192.168.1.x private network with the 2860n at 192.168.1.1 and the Pi at 192.168.1.2.