No idea about canker sores but cold sores outbreaks (caused by the herpes virus) are linked to almonds consumption because they are heavy in arginine and don't have much lysine.
I also had to switch from SLS toothpaste. I used to use a thing called Rembrandt gentle, but they stopped selling that so I started using something called Squigle, which has atrocious branding but is just fine.
I have some amount of uncooked nut allergy and chocolate allergy that causes similar effects to SLS toothpaste. I'm still trying to figure it out.
I wanted to pass along this product I found a few years ago that really changed the game for me though, check out "Durham's Bee Farm, Inc. Canker-Rid."
This has been a problem for me since I was a kid, and all we had back then was Campho-Phenique and pain killing gels. Those things were / are awful. This bee stuff is absolutely amazing. 10/10 check it out.
I'm also SLS sensitive. I found "Verve" toothpaste on Amazon. Reasonable minty taste, cheap, and SLS-free. There are options out there but you really have to search hard for them.
I cut out SLS by purchasing Toms toothpaste, and that helped a lot.
I would still get them though, maybe twice a year.
The thing that finally fixed it was almonds. I stopped eating almonds and I’ve never had a canker sore since.