Why does arcpy.ValidateTableName not replace hyphens (-) when used in a script outside Arc GIS Pro?
From inside Arc GIS Pro

from script but with the ArcGIS Pro python interpreter

Note in Arcgis Pro the hyphen is replaced by an underscore.
It's quick do this with standard python code, but why are there this difference and can arcpy be changed to behave the same?