It may be a problem with the IC defaulting, essentially losing its mind, when you take the batteries out. The typical method of correcting this is to either short out the battery connections or to reverse the battery polarity for a few seconds. Then you reinstall the batteries in the normal manner.
Shorting the leads, you can use a paper clip, with the batteries out is simple enough and unlikely to cause problems. So try that first.
Reversing the battery polarity, installing them backward, is a little more risky, it is a pretty poor design that can't accommodate this, but if the Photon won't work without correction you not out much if it dies completely. Rare is the circuit which would be harmed by reverse polarity but I figure I will bring it up s nobody comes back and says they weren't warned.