First of all, during baking, the frangipane will rise a little and then deflate slightly while cooling. This is totally normal, so don't panic! The important thing is not to open the oven for at least the frit 20 minutes of baking, as the abrupt change in temperature can cause the tart to sink.