I am currently experiencing an issue with my script, which is divided into three main parts. The first part uses Auto_Detection to create the initial Connection Group and performs specific operations based on keywords. The second part sorts and classifies the created Contact Regions. The third part performs a new Auto_Detection based on the classified data to generate different Connection Groups.
The problem occurs when I wrap all parts of the script within with Transaction(suspendClicks=True).
Some operations fail, such as the following code in the first part:
if any(key in contact_bodies_2 and key in target_bodies_2 for key in keywords):
cont_region_2.Delete()
This line works properly when I don't use with Transaction, but the execution speed becomes significantly slower. Could you please provide assistance with this issue?
My scripts are shown below,
Part1:

Part2:

Part3:
