Query string order by custom field

The query_posts is only useful when you actually know what you are doing.
Base on the info you provide this should work for you :

$the_query = new WP_Query(array(
    'post_type'         => 'your_cpt',
    'posts_per_page'    => -1,//get them all
    'meta_key'          => 'field_4',
    'orderby'           => 'meta_value',
    'order'             => 'DESC'
));

?>
<?php if( $the_query->have_posts() ): ?>
    <ul>
    <?php while( $the_query->have_posts() ) : $the_query->the_post(); 

        $class = get_field('field_4');

        ?>
        <li <?php echo $class; ?>>
            <a href="https://wordpress.stackexchange.com/questions/287546/<?php the_permalink(); ?>"><?php the_title(); ?></a>
        </li>
    <?php endwhile; ?>
    </ul>
<?php endif; ?>

<?php wp_reset_query();  // Restore global post data  ?>