I suppose you could re-purpose this function:
https://docs.generatepress.com/article/activating-read-custom-excerpt/#read-more-text
Something like this:
add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' );
function tu_excerpt_metabox_more( $excerpt ) {
$output = $excerpt;
if ( has_excerpt() ) {
$output = sprintf( '%1$s <a href="%2$s">%3$s</a>',
wp_trim_words( $excerpt, 15),
get_permalink(),
__( 'Read more', 'generatepress' )
);
}
return $output;
}
This wp_trim_words( $excerpt, 15)
is what sets the number of words to display