Keep subplot height at a constant height

I have a chart with a small subplot on the top of the chart. I am adding more subplots to the bottom of the chart and I increase the total height of the chart. When I do that the top subplot gets taller too. How can I keep it at the same height?

Thanks

You could compute y domain.
Here is demo.

Dont see a subplot in your example.

The demo is on a subplot with Cartesian xaxis and yaxis axes.
Noting that some traces such as pie have different domain setup,
could you please share a codepen of the graph you are trying to draw?

Yes, probably, it is possible to have an algorithm that would calculate all possible combinations of plots/subplots but I thought there is something like β€˜paper’ for shapes to keep constant height.