You may not have such an iron stomach anymore. I certainly have to be careful about what I eat for tough or long workouts. It’s not sexy but I have the same dinner and breakfast before big training or events. One big thing is to keep the coffee intake to a half a cup or one espresso. Any more than that and I’m playing with fire. Running tends to be a bigger issue with sensitive stomach versus cycling.
Adopt a boring diet to make sure your gut will give you a chance. I know when I try a new gel or during the workout nutrition it could end that workout that particular day. On race day, only nutrition I know and nothing from the aid station I haven’t tried before.
Best of luck it can be very difficult to find the culprit on a code brown.