From what I have tested when playing, and even before I released the game, the logic gate was pretty solid. The code is simple and it's probably not what is causing the problem. If you want to, you can send me the save data (either upload it here if it works, or on discord), that way I can look around and see what the problem is could be.
You can also add me on discord, that way I can help you easier. Discord: kittykillerkuriosity