Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically

You can use sanitize_file_name hook for this.

function my_sanitize_file_name( $filename ) {
    $chars_table = array(
        ' ' => '_',
        '-' => '_',
    );

    $friendly_filename = preg_replace( array_keys( $chars_table ), array_values( $chars_table ), $filename );

    return strtolower( $friendly_filename );
}
add_filter( 'sanitize_file_name', 'my_sanitize_file_name', 10 );

It will also convert letters to lowercase to avoid conflicts on case-sensitive servers.