How to keep baked meringue from shrinking away from pie crust

meringuepie

I've tried this three times now, but have not yet had success.
When making pies like chocolate cream pie or lemon pie and topping them with meringue, after baking said meringue it inevitably shrinks and pulls away from the pie crust, in cases becoming somewhat loose over the pie filling.
These pies are using unbaked filling, in that I'm pre-baking the crust and then adding the filling afterwards (for instance, custard that is cooked on the stove and then poured over the cooled pie crust).

I should note that I am not using the unstable French meringue, and have come to this situation using both Swiss and Italian meringues.
The last couple of times I have paid extra attention to spreading the meringue all the way to the pie crust, 'anchoring' it to try and avoid shrinkage.

Is it wrong to let the filling cool before adding and baking the meringue?

This has generally been my process, but checking some recipes around most do not seem to indicate that these steps can or should be taken separately (as opposed to, say, topping a pie with whipped cream).
I often cool the pie (filling and all), occasionally even overnight, leaving the meringue topping to be made, spread and baked the next day.

EDIT:

I made a coconut chocolate cream pie with meringue topping.
This time, I prepared the meringue, then immediately prepared the chocolate filling, then immediately poured the still-hot cream onto the pie crust and leveled it, then immediately spread the meringue over the hot filling and anchored it to the pie crust edges, then immediately baked it.

I should note that I spread the meringue far to the edge of the pie crust.
The meringue still shrunk as it cooled and was subsequently refrigerated, at points pulling away from the pie crust.
However, it is not so visually dramatic, I guess because I had spread it farther outwards.

The big win though is that the meringue is not loose on the pie filling in this situation.
It feels securely anchored to the filling and cuts without wobbling or sliding around.

Best Answer

Meringue will shrink when it's cooked, there's no way to avoid that.

There are two common options for dealing with that:

  1. A very thick layer, such that as it shrinks, it's still big enough. (Think of the pies that have a two inch thick slab of meringue)
  2. Less connected, more complex shapes, such that as they shrink, they don't all add up to a change that pulls it apart (think of pies with many nicely formed dollups like https://s-media-cache-ak0.pinimg.com/736x/02/d8/43/02d84386535246553b3f4e8463e3047e.jpg )