HTML in Menu Items disappear on save

If you want to add the icon as content in a pseudoelement I would select the a by specifiyng the class you inserted in the WP menu editor (so in the li):

    /*hide the menu text*/
    li.your-class a {
        visibility: hidden;
     }

     /*create the icon and make it visible*/
     li.your-class a::before {
       content: "icon code";
       visibility: visible;
     }