I updated it, it should work for overlapping objects now. Basically anything "in front" of the player sprite should get sent to the layer above, which has the "force own texture" property applied on it and allows for the silhouette object to use the "source in" blending mode, which means it will only appear when overlapping another opaque object below it on that layer.
Event 2 basically z-sorts everything by y position.
Event 3 handles moving objects that are below the player to layer 1 and back to layer 0 when they are above the player
Edit: Recommend utilizing the drawing canvas method below by dop, it is cleaner and less likely to run into unforeseen issues compared to moving objects between layers.