XIAO BLE Sense battery level and charging status

Tried Match-san’s code on XIAO BLE Sense.
I have the same result as mithundotdas.

Any clues ?