Not sure what causes that. Your project is in Bootstrap4 (according to the source code), so is the menu. But you may perhaps have used some of the class names that I also used, but with different properties. I wouldn't know that, because I have never seen your project file.
I'm assuming that you have removed the old navigation before adding a new one, clearly.
The only difference between my first and my second version of this menu is that the submenus, class name '.dropdown-menu', consist of an unordered list with three list items in the 1st version, and a list container with three button links in the 2nd. I have used the same class names in both versions.