Honeywell water heater gas control valve pilot won't stay lit
The device probably has more than one pilot light sensor...for safety.  The electronic one is saying OK, but a physical backup sensor may not be detecting the pilot flame.

If there is a small rod in the path of the pilot flame (the physical sensor), you might try cleaning it with a bit of emery cloth or steel wool.