Cookies rise nicely in the oven, but then collapse
First of all: What does cause the collapse?

The ammonium carbonate creates carbon dioxide under heat, which creates the gas bubbles that expand the dough. The gas bubbles are kept in place by a network of glutenin molecules, which make the dough elastic.

When your dough collapses after some time, it basically means that your glutenin network broke, much like a rubber band that was stretched too far. The carbon dioxide escapes and you have the not quite satisfying end result.

As you reach a level of carbon dioxide you are content with during baking, the best solution seems to be to just use less ammonium carbonate.