I have managed to apply the proper sorting to the archive-data-base.php file
Reading your question, I really do feel that you did not do your sorting correctly in archive-data-base.php
as the same logic will be used for the search page as well. I do believe that you have used a custom query to correct the sorting, which you should never do. I’m not going to explain everything here as I have already done an extensive post on this here.
To correct the sorting in your archive-data-base.php
and search page, you need to use pre_get_posts
to alter the main query with the custom field parameters
You can try the following
add_action( 'pre_get_posts', function ( $q )
{
if ( !is_admin() // Target only front end queries
&& $q->is_main_query() // Target the main query only
&& ( $q->is_search() || $q->is_post_type_archive( 'data-base' ) )
) {
$q->set( 'meta_key', 'title_stand' );
$q->set( 'order', 'ASC' );
$q->set( 'orderby', 'meta_value' );
}
});