Muscle cramps during marathon

Every marathon I’ve ran I’ve hit muscle cramps at 20 for the first and 16 on the second. This year I’ve run 1300 miles, 800 miles for the Chicago Marathon. Long runs at 8:30 for up to 22 miles, marathon pace at 7:40 for MP workouts, speed workouts on track less than 6:30/mi, tapered fully to where my Garmin said I was losing fitness, followed the CARA plan exactly. Paced Chicago in perfect conditions at 8:20 to start through mile 16. Had 1 gel every 3 miles, 2 salt tabs, so much water! Giant wall, couldn’t maintain 9:30 and had to walk/run to the finish for the same finish of 4:15 as my marathon last November. A little disheartening to put in so much work and not even get a PR. Thankful on so many things, but really hung up on the time. Anybody deal with this, recover from it? Learn something?