It sounds like you may have some CSS that is targeting and hiding one of the current menu item classes added by WordPress, such as .current-menu-item
or .current_page_item
. The code you’ve posted does not cause menu items to disappear as has been described.