Adding an attribute to a class after the documentation comment trivia
Look into the WithAnnotation(Formatter.Annotation) member.  This should create a new node with the correct leading indentation.

var newClassNode = classNode.AddAttributeLists(attributeList)
                            .WithAnnotation(Formatter.Annotation)