Check the creation code of the room and you'll find this bit, this is what arranges the objects in 3D space:
The idea is that the level is arranged in chunks 640 pixels wide (for this room in particular - you can use whichever value you want here), every subsequent chunk is put on top of the previous one.
There's a handful of backgrounds for different grid sizes which can be used to help judging distance, the one used in this room is 640 pixels wide. (I've tried an approach where multiple floors are on different layers for a different project but IMO it's an even worse experience since there's no depth perception)
If you're really sure you wanna do this with layers instead, you could try changing the lines in terrain_flat_to_3d from
z = 64*(x div global.level_chunk_width) x = x mod global.level_chunk_width
into
z = 64*(depth div 100)
so the depth value (which is obtained from the layers by default) is used instead. (In this case you probably want to start from a fresh room - by default layers have their depths spaced 100 units apart but the layers in the dungeon_test rooms use compatibility values)