Since the conditional menu likely changes the name of the theme location, you could try this:
add_filter( 'wp_nav_menu_items', function( $nav, $args ) {
if ( $args->theme_location == 'NAME-OF-THEME-LOCATION-HERE' ) {
return $nav . '<li class="search-item" title="' . esc_attr_x( 'Search', 'submit button', 'generatepress' ) . '"><a href="#"><span class="screen-reader-text">' . _x( 'Search', 'submit button', 'generatepress' ) . '</span></a></li>';
}
return $nav;
} 10, 2 );