Both quench and squish (not the same) areas have heights that diminish as the piston approaches TDC, generally to .100 or less from the head's underside (and .100" doesn't work very well), which expels the trapped volume back into the remaining chamber.
These 2 surfaces (piston and head) are generally flat, parallel and horizontal - but need not be. Many hemi engines have a 20 or 30° angled quench ledge with head to match. Many 2-stroke engines have the 2 angles 1 or 2° apart. Heads have been machined into a concave radius closely matching the convex curved piston dome. The important factor in common is that as the distance closes mixture escapes in the right direction.

The edges of the gasket outline remain at constant shape and volume, which remains nearly static - and doesn't burn very well.