The code as is from the X2CommunityHighlander should work to update the matching function in XGAIPlayer.uc
The comment from LW2 config shows why this is needed:
This adjusts an interesting vanilla setting in which patrolling AI (who had not sighted XCOM) would stop patrolling when a concealed XCOM unit sighted them)
Another LW2/X2CommunityHighlander feature that is not part of the WOTC Highlander.
Code is at https://github.com/X2CommunityCore/X2CommunityHighlander/blob/master/X2CommunityHighlander/Src/XComGame/Classes/XGAIPlayer.uc#L702
The code as is from the X2CommunityHighlander should work to update the matching function in
XGAIPlayer.uc
The comment from LW2 config shows why this is needed: