Hamburger Menu Animations Interaction

I have a landing page project, and i have a mobile menu with links to sections on the page, when i click on them the menu would not close, so i made two hamburger buttons, with one open interaction and one close interaction, the hamburger button works perfectly, but when i click on the links, that have the same close interaction as the close button, the button disappears instead of switching to the open button, can someone please assist me on this.

Thank you in advance !