It's been happenning to me too for a few months: whenever I get out of a wifi network, mobile data doesn't work until I turn plane mode on and off. I did a factory reset a few days ago, and problem persists, so it seems a bug introduced in some official update.