I did exactly that a few times before updating to Oreo. I would lose signal, backup my current configuration, flash a stock backup and then flash the backup I had just made and I would have a signal again. I would wipe everything except system before flashing back to the custom rom...