I tried two things, first (on the iPhone) I went to settings, on wi-fi, then pressed on "i" on my network. You will then see ip address, subnet mask, etc, went to the bottom and pressed "Renew Lease", this "solution" worked for a few minutes only.
Second, on that same place, on the last line that says "Client ID" I put my MacBook IP address, lo and behold my Mac always connects to my iPhone and I'm able to call landlines.
If you turn off Mac or iPhone when you switch them back on, it's probable that the Mac IP had changed and when trying to place calls the response will be the "both Mac and iPhone must be on same network" error.
Solution, on the Mac, press the wi-fi thing on the top right next to volume setting, open network preferences and on status it will say the IP "192.xxx.x.x"
Then on your iPhone you put that IP on cliente ID and the bloody thing will work.
One user switched from DHCP to STATIC, I guess then you would only have to put the IP once and it wouldn't change. I don't know how to do that, and security wise I'm not sure if there's any good from it. Hope it helps.😁