The reverse polarity light is looking for a voltage drop between the neutral and ground wires of your shore power connection (which should theoretically both be at zero voltage with respect to earth ground). If there was actual reversed polarity, the “neutral” wire would in fact be hot and that would cause a 120VAC drop which would obviously make the light glow.
However even with correct polarity, if you have a long run back to your AC power source/service entrance, and undersized wiring, and your boat is drawing quite a few amps (think refrigerators, air conditioners, space heaters, battery chargers, etc.), the current running through the neutral wire can create a voltage drop with respect to the green ground wire. This can make the reverse polarity light glow, perhaps dimly, even when your polarity connection to shore power is correct.
Try turning off all AC power draws including any in your garage on the same circuit. If your reverse polarity light goes out, polarity is ok. You can also purchase an inexpensive plug-in tester. Or use a multimeter to test for AC voltage between neutral and ground. There have been other threads about the reverse polarity light coming on when people are plugging into long extension cords or with a long run back to the service entrance.
John