Why does my dropdown menu on Dawn close before I can click?

I followed a tutorial to make a dropdown menu on dawn that opens when you hover over the button and the menu will open but as soon as you move the mouse to click on one of the “child” or “grandchild” buttons the menu dissapears before you can click