I am designing a constant 5 volt output switching regulator that bucks 12 to 24 volts down to 5 volts while supporting 5 amps. It is used to boot up a Raspberry Pi with a 10 inch screen. At 12 volts, the Pi will boot up fine. At 24 volts, around halfway through the bootup, the regulator will drop from 5 volts to around 3.5 volts, and that will cause the Pi to restart the bootup sequence. The current adjust resistor is set to 5.6 kΩ, which would allow almost 6 amps. I am at a loss for what is wrong.
Shown below is the schematic for the regulator. It is nearly the same as the recommended design from Texas Instruments.

Shown below is the schematic for the regulator. It is nearly the same as the recommended design from Texas Instruments.
