My 20-year-old home control computer is on my LAN and has incoming port forwards for remote access. My iPhone can access it either way, but I have to stop and think which connection it is using, so which setup to select. If I walk too far out in the yard while it is on Wi-Fi and it switches to Cellular, the connection drops.
I've been solving this by keeping the phone on a second Wi-Fi with a second WAN connection, so the phone could use the same target IP regardless of the signal path. But that WAN is no longer available.
I fantasized about a static route that would grab a LAN request for the computer's specific forwarded port at the WAN address, and redirect it locally to the computer's LAN address. So the phone could request like it was on the internet even if it was on the local LAN. But apparently it is impossible to set up a static route where any part of the destination is shared with the WAN, even if you have more control than my router offers.
How do people deal with this? Is there some VPN or virtual network trick? Or maybe most IoT users don't care about access outside their Wi-Fi bubble? My system controls pumps, irrigation, water treatment, and sensors spread over several acres - well beyond my Wi-Fi reach. In Android I could imagine a smart tool that would switch network addresses when the connection method switched, but in iPhone?