This makes sense for adults, as we are heavier - the weight of our bodies compresses the soft disks in our spines as we remain vertical. Children 40" tall should not be impacted by spine compression at all over the course of a day - they simply don't have enough body mass. However, as they grow tired they will not stand as erect. Their posture changes. This would seem to be the more likely "culprit".
ETA - Now that Disney is using the Magic Band technology, it would be very easy to have a one time measurement of each child associated with their
MDE account. Child gets the MB scanned and it comes up blue if he/she is not tall enough. Why keep measuring at every ride all day long when WDW has this technology. Heck, many parks measure children at the start of the day and give wrist bands to kids colored to indicate the rides for which they are tall enough. Expectations set at the outset - no heartbroken kids at a ride entrance.