Candidates sparred over immigration, AI and more ahead of next month's primary election.