The contains function is working as advertised.
The statement contains("Jane_2", "Jane") returns true because Jane is a substring of Jane_2
contains("Jane_2", "Jane_2") returns true also because Jane_2 is a substring of Jane_2
contains("Jane_2", "Jane_3") returns false because Jane_3 is not contained in Jane_2.
I think you want to use == for an exact match instead of contains.
name = "Jane_2";
nameList = {"Jane", "Louise", "Katie", "Jane_2", "Becky", "Jane_3"};
act_nameList = {};
For( i = 1, i <= N Items( nameList ), i++,
If( name == nameList[i],
Insert Into( act_nameList, nameList[i] )
)
);
Show( act_nameList );