When I run my script in the Python window in ArcGIS Pro 2.3.2 all changes are made in the version specified. When I run the same script as a geoprocessing tool all changes are made to DEFAULT. Is it possible to create a geoprocessing tool that changes the version and edits within that version?
workOrder = arcpy.GetParameterAsText(0)
# Create version
arcpy.CreateVersion_management("C:/Users/azumwalt.UECOOP/AppData/Roaming/ESRI/Desktop10.4/ArcCatalog/ElectricModel - azumwalt.sde", "DEFAULT", workOrder+"_TEST", "PUBLIC")
arcpy.ChangeVersion_management("Consumer_SQL02", 'TRANSACTIONAL', "DBO."+workOrder+"_TEST", None)