If you also plot the current through the mosfets you will see the difference. For low current mosfets it is fine to use the high side P-mos and low side N-mos and connect the gates together. This will still cause a short, but only for a very short amount of time. You will find that if you switch with a high frequency the mosfets get warm because they short more often and dissipate the power.
For big mosfets, the high gate capacitance makes a slow rise time, causing both transistors to be on for a longer time during the transition, shorting the supply to ground for a substantial time.
The solution for big (high current) mosfets or slow rise times is to use a non-overlapping gate driver. This means that one would first turn off one transistor and only when it is off, turn on the other transistor.
An example of a non overlapping gate driver and the output waveform is shown below.