In[]:=
getCausallyDisconnectedRegions[rules_,initialCondition_,stepCount_Integer]:=Module[{newEventsInitialCausalGraph,newEventsFinalCausalGraph,causalGraph,initialEventsList,newEventsList},newEventsInitialCausalGraph=ResourceFunction["SubstitutionSystemCausalGraph"][rules,initialCondition,stepCount-1];newEventsFinalCausalGraph=ResourceFunction["SubstitutionSystemCausalGraph"][rules,initialCondition,stepCount];causalGraph=ResourceFunction["SubstitutionSystemCausalGraph"][rules,initialCondition,stepCount];initialEventsList=VertexList[ResourceFunction["SubstitutionSystemCausalGraph"][rules,initialCondition,Ceiling[stepCount/2]]];newEventsList=Complement[VertexList[newEventsFinalCausalGraph],VertexList[newEventsInitialCausalGraph]];Select[If[!SubsetQ[VertexOutComponent[causalGraph,#],newEventsList],#Complement[newEventsList,VertexOutComponent[causalGraph,#]]]&/@initialEventsList,#=!=Null&]]
In[]:=
getCausallyDisconnectedRegions[{"AB""BAAB","A""BA"},"AB",4]
Out[]=
{2{26,27,28,29,38,39,40,41,42,43,44,45},4{26,27,28,29,38,39,40,41,42,43,44,45},5{22,23,24,25,30,31,32,33,34,35,36,37},6{24,25,26,27,28,29,34,35,36,37,38,39,40,41,42,43,44,45},7{26,27,28,29,38,39,40,41,42,43,44,45},8{22,23,24,25,28,29,30,31,32,33,34,35,36,37,42,43,44,45},9{22,23,24,25,30,31,32,33,34,35,36,37}}
In[]:=
HighlightGraph[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",4],{26,27,28,29,38,39,40,41,42,43,44,45}]
Out[]=