How to constrain the results to a specific post_type on tag archive page?

This works for me:

function namespace_add_custom_types( $query ) {
  if( is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
    $query->set( 'post_type', array(
     'YOUR_CUSTOM_POST_TYPE', 'nav_menu_item'));
      return $query;
    }
}
add_filter( 'pre_get_posts', 'namespace_add_custom_types' );