Yes, they are allowed. US and Europe.
In Europe right now, have not had any problems.
That said, what I do is fully charge my shaver between the time I last shave at home and before I depart (time permitting), and leave the cable at home. This way, it reduces the chances of x-ray operators seeing a cable near an electrical device (less chance for bag check), and I travel lighter.
Safe travels.