When I enable your mod, if I open the Moon_Logic mod entity GUI in the game and then use the hotkey "e" to close the Moon_Logic mod entity GUI, attempting to reopen the Moon_Logic entity GUI will result in a game error. However, if I close the GUI using the close button within the Moon_Logic entity GUI, it works fine. This issue does not occur when your mod is disabled; using the hotkey "e" to close works without any problems.
Error while running event Moon_Logic::on_gui_opened (ID 88)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
[C]: in function 'index'
__Moon_Logic/control.lua:816: in function <Moon_Logic/control.lua:805>