A BFS level is a distance. Eight directions, a size snapshot taken before each level, and the one line the whole pattern rests on: mark on push, in the same statement that enqueues. Flip the toggle to run the mark-on-pop version and watch the queue.
too large — failure mode 1.1, a distance greater than the true minimum.