Some scholars allow trimming the beard slightly to maintain a neat appearance, as long as it does not entail shortening it beyond a certain length or altering its natural shape. It is recommended to consult with a knowledgeable scholar to understand the specific guidelines and rulings applicable to your situation.