If the plug of the charger contains three terminals, it may be incorrectly wired, by swapping ground and neutral. This is a dangerous configuration to use that also may or may not work, depending on what the installation does with the ground wire. Ground and neutral wires should not actually be connected right at the socket or nearby, but they are often connected at the final step-down transformer of the supply. Some particular socket may not have ground connected at all so this explains why the wrongly wired plug works on some sockets and not others.
It may be the case if the plug has been manually replaced, cutting away a plug from one country and screwing on a different plug for another.
If the power cable of the charger can be disconnected from the charger and there is a replacement at hand, I would suggest to try with another cable.