photon is not setting to new wifi creadentials , its setting to old wifi network only on configuring
Try holding the mode button for 10+ seconds to remove all credentials, and give it another shot?
Since we have not a lot of info to go on one possibility might be that your code is using
How are you trying to set the credentials?
If you want proper help you need to provide as much info as possible in the opening post.