How to make /search/ without parameters not return a 404?

The search rewrite rule only captures the pattern search/(.+)/?$. A request to search/ matches the root pages rule, so WordPress tries to find a page with that slug. You could create a page at that location and load a template via a filter, or, you could add a rewrite rule that just does an empty search:

function wpd_empty_search_fix(){
    add_rewrite_rule(
        '^search/$',
        'index.php?s=",
        "top'
    );
}
add_action( 'init', 'wpd_empty_search_fix' );