For others looking for help in this space.
I've just tested the below line in a python script that looks at a set map (Data Editing) in the Current project, and had the last 2 lines repeated for all the different layer names that I wanted it to update. It successfully deleted the definition query from each layer.
aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps("Data Editing")[0]
for lyr in m.listLayers("Layer 1"): ###Repeat these 2 lines for each layer
lyr.definitionQuery = None
for lyr in m.listLayers("Layer 2"):
lyr.definitionQuery = None
I plan to write a simple script that can be used on any project and map which will just go through all layers in the current map and wipe and definition queries. Variations of this could include a 3rd line for each layer that adds a replacement query in the originals place.
Lindsay Raabe
GIS Officer
Forest Products Commission WA