What you're explaining sounds like an old Moto bug, and not a broken phone. Sometimes (usually, but not always), you can take out the SIM, turn on airplane mode, reboot, turn off airplane mode, replace the SIM. Sometimes the SIM step is needed as a bookend, sometimes it works better just leaving it in and taking it out and putting it back in at the end, sometimes taking out the SIM at all is an unnecessary step. Doesn't matter if you've flashed or changed the firmware or done a reset, the problem won't disappear without the above mentioned steps. Occasionally, it takes more than one or two times of doing it to get it working again.