The second sentence is correct:
Il sait se raser la barbe.
The first one doesn’t work because se rase la barbe is a present and expects a first person subject before.
Il se rase la barbe. as you wrote is correct.
Pierre se rase la barbe. is fine too.
The issue is Il sait can’t be used as a subject, or even if there are very rare cases where it is usable as a subject (e.g. Il sait est ce qu’elle compris alors), it can’t be the subject of se raser anyway.
In English, I guess a close inconsistency would be:
He knows is shaving his beard.
Leave a comment