Prevent WP from wrapping html in caption shortcode after 'image_send_editor' filter is applied

In my functions.php I have cooked up some functions to filter the attachment output code, when an attachment is sent to the editor.

function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) { 
  $arr = get_attachments_and_widths_arr($id);
  return attachments_and_widths_to_html($arr, $id, $align, $caption, $alt);
}
add_filter('image_send_to_editor', 'filter_image_send_to_editor', 10, 9);

The return statement returns a string that contains pure html code and already has the caption text properly added to it. The problem is that because the Media Libary has some text in the ‘Caption’ field for that image and it automatically adds the shortcode around my html code after the above function returns. So I guess strip_shortcode() will not work in my case, since the string I am returning as filtered code does not yet have any shortcode, is added after the function returns.

How do I prevent this from happening?

EDIT: I know about this post, but I would like WP not to send any shortcode to the editor at all. The solution in that post removes the code when the post html is generated.

Solutions Collecting From Web of "Prevent WP from wrapping html in caption shortcode after 'image_send_editor' filter is applied"