My Android 7 device is pretty good with realizing when the wifi doesn't actually give Internet access, and it then routes data through the 4g/mobile connection instead. Nexus 6, stock Android 7.1.1.
That's great it works for you. I have to stare at "Could not connect to server", wifi icon with a cross and a notification asking me to sign in to some telco's hotspot. Only thing that gets me back online is switching the wifi off