I can't see your image, but I assume that you are facing problem with Z-ordering. You can use For Each (ordered) and use object Y position as parameter. Here an example for that:
Almost. But your example appears to only show how to fix my issue if it's only a single object. What I'm looking for is a way to make the player to go in front of or below (on the z layer) the chest depending of their placement on the y axis.