That is still the routine and progress is periodically checked, usually by the Master At Arms, to ensure a full set is blossoming; if it is not forthcoming then it is back to shaving. 'Fancy' trimming is not permitted however it should be neatly trimmed so no ZZ Top lookalikes. That approach also ensures that an adequate seal is made if wearing a gas respirator etc. In Prince Philip's time in the Service officers rarely had beards, with the exception of submariners, and certainly not Commanders in command or officers in the Royal Yacht!
Not sure if it still the case but I had to formally write to my Captain to request permission to get married to ....; this was to avoid the unforeseen outcome of a run ashore with an inappropriate lady!
Dick