wp_trim_words strips dashicons

Your problem is that your filter is trimming all titles to 7 “words”. This includes blog posts, pages, menu item labels, revision names, and even product names, if you have products.

You need to adjust your filter to be less aggressive and only target the titles that you need to truncate. For example, the following code will only truncate titles:

  • For Posts
  • In the main loop.
  • On the front end.

function wpse_360758_trim_words( $title, $post_id ) {
    if ( is_admin() ) {
        return $title;
    }

    if ( in_the_loop() && 'post' === get_post_type( $post_id ) ) {
        $title = wp_trim_words( $title, 7, '...' );
    }

    return $title;
}
add_filter( 'the_title', 'wpse_360758_trim_words', 10, 2 );