All but the first symbolized class is dropped in the legend of an exported layout when the 'Only show features visible in the map extent' option is enabled in the kernel density layer's legend item properties. If the first symbolized class is not in the map extent, the legend is blank.