4. As shown in the figure, $A B C D-A^{\prime} B^{\prime} C^{\prime} D^{\prime}$ is a cube. Any plane $\alpha$ is made perpendicular to the diagonal $A C^{\prime}$, such that $\alpha$ intersects each face of the cube. Let the area of the resulting cross-sectional polygon be $S$, and the perimeter be $l$. Then
A. $S$ is a constant, $l$ is not a constant
B. $S$ is not a constant, $l$ is a constant
C. Both $S$ and $l$ are constants
D. Neither $S$ nor $l$ are constants
Given a cube $A B C D-A^{\prime} B^{\prime} C^{\prime} D^{\prime}$ with edge length $a$, since $\frac{E F}{D^{\prime} B^{\prime}}=\frac{A^{\prime} F}{A^{\prime} B^{\prime}}, \frac{F G}{A^{\prime} B}=\frac{B^{\prime} F}{A^{\prime} B^{\prime}}$, adding the two equations gives
$$
\frac{E F+F G}{A^{\prime} B}=\frac{A^{\prime} F+B^{\prime} F}{A^{\prime} B}=1 \Rightarrow E F+F G=A^{\prime} B \text {. }
$$

Thus, the perimeter $l=3 \sqrt{2} a$ of the cross-sectional polygon is a constant; noting that each interior angle of the cross-sectional polygon is $120^{\circ}$, the area $S_{\triangle E F G}$ is maximized when $E F=F G$.
Therefore, the area $S$ is maximized when the cross-sectional polygon is a regular hexagon, meaning $S$ is not a constant. Hence, the correct choice is $B$.