It mixes initially but in absence of air currents or over movement it will form layers.I don't remember that from chemistry class. Gasses mix unformly regardless of weight. Stratification is only temporary and acheived with gentle handling. (But chemistry was a long time ago)
Stratification can occur, but (in the absence of thermal gradients) for the difference of partial pressures in a gas mixture to be significant enough to result in an appreciable gradient you would need a huge container (not gonna do the math, but likely several kilometers in diameter).
Gas mixtures do not act like mixtures of liquid. The heavier molecules do not push the lighter ones out of the way and sink below them. Gas mixtures can be thought of separate mixtures of each component that do not interact. Both the O2 and the CO2 will expand to fill the container equally as if the other was not there.