Martin Luther believed that Mary did not have other children, and did not have any marital relations with Joseph,[25] maintaining, that the brothers mentioned were cousins.[26] This is consistent with his lifelong acceptance of the idea of the perpetual virginity of Mary.
Again, Luther WAS a Catholic. From: lcms.org
Lutherans today are not bound to Luther's personal views regarding how this was accomplished; in any event, it is clear from Luther's other and later writings on Mary that he did not hold to the view that Mary was personally devoid of all sin (which would mean that she would have had no need of forgiveness or salvation). Luther also held to the semper virgo (the perpetual virginity) of Mary. This, again, is a personal view to which Lutherans today are not bound. Scripture is not clear on this matter, and Lutherans do not regard it as a theological issue.
The Lutheran Confessions aren't based upon what ML believed but upon what Scripture says.