Using the geoprocessing tool, "Layer To KML" within a python script tool and ArcGIS Pro v2.9.2 crashes without warning, or error(s). If the tool is used outside of the script tool, there is no problem and KMZ is created as expected. No screen shots available but my code is as follows:
arcpy.LayerToKML_conversion(out_layer, "MergedShape.kmz")
Seems straight forward enough but crashes everytime.