By default algebraic number coefficients are treated as independent variables:
With
Extension->Automatic algebraic dependencies between coefficients are recognized:
Pull out multiple factors over the integers modulo 2:
Pull out multiple factors in a trigonometric expression: