Is drawing/redrawing shapes in layers possible?

What I need help with

I want to draw a white rectangle as the background and change its colour to black when the dark mode option is selected from the menu. But so far, I've only been able to redraw the rectangle which makes it redraw on top of the other things that I've drawn on my screen.

I want to know if a Z stack layer system can be done for drawn shapes too, so we can redraw shapes in their respective layers without covering the shapes subsequently drawn after them.

What I've tried so far

I think for this particular case, I can use sprites and setBackgroundDrawingCallback or a tilemap with a low ZIndex value (as specified in the example in the SDK).

But just for curiosity I want to know if drawing shapes in layers in possible or not.

The concept of layers doesn't exist in the SDK outside of the sprite system's z-ordering, so that would probably be the best way to go!

Can you explain the reasoning behind this? Are there any plans to introduce layers outside of sprites?