Mqtt light doesn't work

I have a couple wifi lights that flashed tasmota version 8.1.0. They are connect to local mqtt sever and set to auto discovery. The mqtt is integrated to HA so the lights are appeared in HA.

All lights work fine exception one of them. I can turn it on but click it again doesn’t turn it off. Also the light card doesn’t change to the on state. I open the detail by click the three dot on the top right corner of the light card(see below), if I click the switch to turn it on, the switch will automatically set back to off after a few seconds.

I have set the retain flags as below:
SwitchRetain Off
ButtonRetain On
ButtonRetain Off
PowerRetain On

Control the light from the tasmota ui works fine. What could be the issue and how to fix it?