Little tougher but this PHP snippet should work:
add_filter( 'generate_post_author_output', 'tu_remove_by_byline' );
function tu_remove_by_byline() {
printf( ' <span class="byline">%1$s</span>', // WPCS: XSS ok, sanitization ok.
sprintf( '<span class="author vcard" itemtype="https://schema.org/Person" itemscope="itemscope" itemprop="author">%1$s <a class="url fn n" href="%2$s" title="%3$s" rel="author" itemprop="url"><span class="author-name" itemprop="name">%4$s</span></a></span>',
__( 'Publish by', 'generatepress' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
/* translators: 1: Author name */
esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
esc_html( get_the_author() )
)
);
}
Adding PHP: https://docs.generatepress.com/article/adding-php/