Stop post being published

wp_die(); will run AFTER the post is published. You are checking whether the post is published or not, which means the post is already published, what’s done is done. You can update to post status from published to draft instead of using wp_die();. The following code will do it:

function check_post_limit( $ID, $post ) {
          $post = array( 'ID' => $ID, 'post_status' => 'draft' );
          wp_update_post($post);
 }
add_action( 'publish_post', 'check_post_limit', 10, 2 );