This is a very interesting question.
As far as “penalties” for impersonating a priest, I have no idea, but I am sure there are some, especially if one is Catholic!
If a Catholic, the person is excommunicated
§2 The following incur a latae sententiae interdict or, if a cleric, a latae sententiae suspension:
2° a person who, apart from the case mentioned in §1, though unable to give valid sacramental absolution, attempts to do so, or hears a sacramental confession.
§3 In the cases mentioned in §2, other penalties, not excluding excommunication, can be added, according to the gravity of the offence.
Can. 1379 A person who, apart from the cases mentioned in Can. 1378, pretends to administer a sacrament, is to be punished with a just penalty.
intratext.com/IXT/ENG0017/__P52.HTM
latae sententiae interdict:
The particular personal interdict, which is a real censure, affects individuals much in the same way as excommunication. They may not assist at the Divine offices or at Mass, and if they are interdicted by name they should be put out, however, if they refuse to withdraw it is not necessary to suspend the service since, after all, the interdict does not deprive them of the communion of the faithful. They may not demand to receive the sacraments, except Penance and the Viaticum, and it is not lawful to administer them. They are to be deprived of ecclesiastical burial, but Mass and the ordinary prayers may be said for them. A cleric violating the interdict becomes irregular.
newadvent.org/cathen/08073a.htm