Sodium laureth sulphate in toothpaste irritates the hell out of mouth ulcers. Find a toothpaste which doesn’t have it and you’ll reduce the irritation. Two I’ve found are Sensodyne and Kids Aquafresh. Go for the kids one because it’s got less mint in it and won’t burn as much.
Treatment. Once they’ve flared up, there is only one effective treatment. This is a corticosteroid in oral paste called Adcortyl and it’s now discontinued in the UK. Go on eBay and get a tube of Trinolone or Kenacort which is the same stuff. Trinolone will be coming from Thailand and Kenacort from Turkey or over that way.
This is the only stuff which actually works. Big blob on the ulcer over night, it’s really sticky and unpleasant but they’ll be gone after two nights. You can try Corsodyl as they begin to appear and it’s quite effective, but it will stain your teeth something chronic.