Plugin echos text from shortcode function in gutenberg page editor

As Milo noticed, shortcodes should return content instead of echoing it. So change

while($query1->have_posts()) : $query1->the_post();
echo '<div class="menu-thumb">';
    the_post_thumbnail( );
echo '</div>';
echo '<div class="menu-title">';
    the_title( );
    echo '</div>';
echo '<div class="menu-content">';
    the_content( );
echo '</div>';

endwhile; 

to

   while($query1->have_posts()) : $query1->the_post();
        $div = '<div class="menu-thumb">';
        $div .= get_the_post_thumbnail( );
        $div .= '</div>';
        $div .= '<div class="menu-title">';
        $div .= get_the_title( );
        $div .= '</div>';
        $div .= '<div class="menu-content">';
        $div .= get_the_content( );
        $div .= '</div>';
        return $div;
   endwhile;

(replace echo with return and also anywhere there is a the_something() replace it with get_the_something() so that at the very end, it returns the whole chunk of output.)