Don't assume that you have to be right at the border for coverage to switch. There are stretches of I8 in AZ where your phone will connect to the Mexican network unless you disable roaming, and I've seen similar issues in Europe.
So, I second the advice to disable data roaming at all times, and only turn it on consciously when you need it.