I run distance accumulation in a standalone Python script and save the resulting raster as follows:
dist_acc_raster = arcpy.sa.DistanceAccumulation(dest_features, "", "",
cost_raster, "", "", "", "",
back_dir_raster, "", "", "", "",
"", "", "GEODESIC")
dist_acc_raster.setProperty("name", "some_specific_name")
dist_acc_raster.save(r"C:\some.gdb\some_specific_name")
# EDIT: replaced path variable with path to make it clearer
The raster name is always set to the default "Distanc_{suffix}" name which annoys me when adding the data to a map later. This does not happen when I run the tool manually in ArcGIS Pro. How can I set the name property? "setProperty" does not appear to work, and is probably not what I need (from the ArcPy Raster page: "Add a customized property to the raster dataset").
EDIT: added screenshot from FileGDB raster datasets.