Here is a tutorial I made about normalizing your depth sorting:
You'll want to also reference the Eclipse User Manual: https://drive.google.com/file/d/1dOVpNrsVvod9C8GMnuO6_hSj5hGVmVM-/view?usp=shari...
You need to use the functions for changing things like depth or updating it which the user guide explains. For lights and normal objects inherited from __le_game or something you will want to use such functions.
Setting things manually with "instance.depth" will not work.
Also, you mentioned isometric coordinates. So, you would most likely want to use the isometric y value plus the distance to the bbox bottom from the origin because your bbox_bottom will not be the same in isometric coordinates. You still would do all your normal logic with collisions and interactions using normal x/y coordinates, but for drawing in an isometric game everything is drawn at a different coordinate along with their depth sorting.