Vitest 3.1.2 has made a change to scale the iframe for non-ui case:
vitest-dev/vitest#6512
This cause all headless run to render in a viewport of different dimension, causing all snapshot to fail.
To workaround it, you need to delete the existing snapshots and regenerate them.