Did you try using instance vatiable to set Y value for current sprite and then sort Z order? something like that
create instance variable "z" for family Boxes
then
every tick -> Sprite | Set "z" to self.Y
System: For each Boxes order by Boxes.Z ascending > Boxes | move to top of layer
this way you can specify Z order for every single object using
every tick -> Sprite | Set "z" to self.Y+15
or
every tick -> Sprite | Set "z" to self.Y-150
or whatever you like.
Even if sprites image point will have Y=50 you can set this Sprites Z to let say 150 using Set "z" to self.Y+100