I don’t know if it cans help you but in my case ([SOLVED] Tradfri binding is so unstable for me) it was the power plug making issue. I checked it make sure it is really good connected and actually let the gateway open in order to not disturb it.
And it is weird but since I did not face this issue again.