A stack is a vertical group of three boxes. Swapping two whole columns within the same stack preserves a valid completed Sudoku. The proof mirrors a row swap, but it is worth checking directly rather than relying on the resemblance.
Each column retains its set of nine digits. Every row retains the same entries with two locations exchanged. Each affected box also retains its original nine values because the two columns pass through the same boxes. The arrangement changes, while each unit's collection remains intact.
Now imagine exchanging column 2 with column 5. They belong to different stacks. The rows and columns still contain the same sets, but values move between boxes. Some completed grids might happen to remain valid under a particular exchange, but the transformation does not guarantee it in general.
A useful proof habit is to ask what a rule preserves, not what a picture appears to preserve. Draw arrows for the values moving between cells. For a safe within-stack swap, the arrows stay inside each box as they pass across its rows.
This reasoning can help you evaluate a generated puzzle variant. If a tool changes a source grid, its output should still be checked against all rules and against the transformed answer. A mathematically valid operation is one part of a trustworthy workflow; consistent application is another. The exercise offers a compact example of why local-looking changes can have consequences across an entire grid.
Sources & notes
Original puzzle teaching and explanation by Evan Tessell.