First of all make sure that you have the right case of the letters.
charging is not always equal to Charging.
Secondly be aware that nearly all modern mobile phone use smart charging where the battery will be charged to 100% and then the charger will be disconnected programmatically and not be activated again until the battery level have dropped some %, like to 97% or 93%. This is to prevent the battery from being topped up on the last % where the most damage to the battery life occur.
The most modern mobile phones even use AI learning to predict your usage pattern and then might wait even longer to make the charger to 100% hit just before the time where you would normally disconnect the phone.
These two features can make a mess of many sensors and automations. Sometimes you can be lucky to have a “charger connected” sensor, but other times you are just forced to make some assumptions.
They are using Developer Tools → States to check, which does not translate states. So what is shown there is correct. It’s the only place you can be sure the state is correct.