Instead, one can use different masking layers. For example, oxide and resist for dry etching. It is somewhat tricky to get the deeper etch depth right, if the etch rate is not constant. This is true in plasma systems with loading, and also the etch chemistry does change when masking layer changes. So you need to find the respective etch rates for each scenario.
Wet etching is more straightforward since the etch rate is constant.
Possible masking layers are nitride and oxide, each of which can be selectively patterned and removed. This nested mask approach can be extended to more steps, if you find more masking layers that can be selectively patterned and removed, e.g. metals. Thank you very much.