Chabad.org — English translation + Rashi
Torah Temimah cites Nazir 40a: the Levites’ shaving (“והעבירו תער על כל בשרם”) is a positive mitzvah for that moment of consecration, not a lasting obligation for all generations.
English: It was taught: the Levites shave, and their shaving is a mitzvah, as it is written “and they shall pass a razor over all their flesh.” It is only a mitzvah for that hour—when they were chosen for service in the wilderness—and does not apply for generations.
Gezerah / positive commandment from the verb — the Torah’s command to shave is itself the source of the mitzvah character of the act.
The purification of the Levites included a complete body-shaving that functioned as a one-time consecration rite, parallel in intensity to other desert-era dedications.