How to remove image size inline style in article and include caption

Really not sure why you would want to do something like that.
As Jacob Peattie said those dimenstion are there to prevent layout shift when images are being loaded.
But if you still want to remove width and height attributes you could do this.

add_filter('post_thumbnail_html', 'bt_remove_post_thumbnail_html_width_height', 10, 4);
function bt_remove_post_thumbnail_html_width_height ($html, $post, $post_thumbnail_id, $size) {
    $width = get_option($size . '_size_w');
    $height = get_option($size . '_size_h');
    
    $html = str_replace('<img width="' . $width . '" height="' . $height . '"', '<img', $html);
    
    return $html;
}

add_filter('image_send_to_editor', 'bt_remove_image_send_to_editor_width_height', 10, 7);
function bt_remove_image_send_to_editor_width_height ($html, $id, $caption, $title, $align, $url, $size) {
    $width = get_option($size . '_size_w');
    $height = get_option($size . '_size_h');
    
    $html = str_replace('<img width="' . $width . '" height="' . $height . '"', '<img', $html);
    
    return $html;
}

This gets the width and height of by the size and with str_replace we just replace the initial image html, that contains the width and height, with only the opening image tag.

If you would need this to happen with other filters you will need to check wordpress github to better understand what paramaters are available and and what position.